How to get the largest possible value of int in C#

1 Answer

0 votes
using System;
					
public class Program
{
	public static void Main()
	{
		int n = int.MaxValue;
		
		Console.WriteLine(n);
		
		Console.WriteLine(n + 1); 
	}
}



/*
run:

2147483647
-2147483648

*/

 



answered May 31, 2020 by avibootz

Related questions

1 answer 145 views
1 answer 143 views
1 answer 137 views
1 answer 148 views
1 answer 117 views
1 answer 165 views
...