How to get the size, min and max of int Data Type in C#

1 Answer

0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(sizeof(int));
            Console.WriteLine(int.MinValue);
            Console.WriteLine(int.MaxValue);
        }
    }
}


/*
run:
    
4
-2147483648
2147483647

*/

 



answered Dec 10, 2016 by avibootz

Related questions

1 answer 156 views
1 answer 169 views
1 answer 188 views
1 answer 159 views
1 answer 157 views
1 answer 175 views
1 answer 161 views
...