How to set max long value with hex value in C#

1 Answer

0 votes
using System;

public class Program
{
	public static void Main(string[] args)
	{
		long hexMaxLong = 0x7fff_ffff_ffff_ffffL;
         
        Console.WriteLine("Hex max long: " + hexMaxLong);
	}
}


 
// 9,223,372,036,854,775,807



/*
run:
  
Hex max long: 9223372036854775807
  
*/

 



answered Aug 1, 2022 by avibootz

Related questions

1 answer 145 views
1 answer 208 views
1 answer 145 views
1 answer 172 views
172 views asked Jun 9, 2021 by avibootz
1 answer 154 views
1 answer 108 views
1 answer 166 views
...