Testing long
C# program that uses long type
using System;
class Program
{
static void Main()
{
long a = 100;
long b = -100;
// Long can be positive or negative.
Console.WriteLine(a); // 100
Console.WriteLine(b); // -100
// Long is very long.
Console.WriteLine(long.MinValue); // -9223372036854775808
Console.WriteLine(long.MaxValue); // 9223372036854775807
// Long is 8 bytes.
Console.WriteLine(sizeof(long)); // 8
// Default value is 0.
Console.WriteLine(default(long)); // 0
// Long is System.Int64.
Console.WriteLine(typeof(long)); // System.Int64
}
}