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

1 Answer

0 votes
using System;

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


/*
run:
    
2
-32768
32767

*/

 



answered Dec 9, 2016 by avibootz

Related questions

1 answer 262 views
1 answer 235 views
1 answer 256 views
1 answer 249 views
1 answer 229 views
1 answer 156 views
...