class Program
{
static void Main(string[] args)
{
Int64 a = Int64.MaxValue;
Int64 b= Int64.MinValue;
try
{
checked
{
Int64 m = a * b;
}
}
catch (OverflowException ex)
{
Console.WriteLine("over flow exception");
Console.Read();
}
}
}
if the variables are declared as int, i am getting the compilation error, conversion is requreid from int to long.
- why am I getting this error although i am using int.
- What are the alias
Int32
andInt64
- When to use
Int32
andInt64
, does it depend on OS?