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 249 views
1 answer 222 views
1 answer 241 views
1 answer 238 views
1 answer 221 views
1 answer 147 views
...