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

1 Answer

0 votes
using System;

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


/*
run:
    
8
-9223372036854775808
9223372036854775807

*/

 



answered Dec 11, 2016 by avibootz

Related questions

1 answer 190 views
1 answer 177 views
1 answer 231 views
1 answer 174 views
...