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 151 views
1 answer 214 views
1 answer 148 views
1 answer 181 views
181 views asked Jun 9, 2021 by avibootz
1 answer 161 views
1 answer 116 views
1 answer 170 views
...