Может кто-нибудь объяснить мне причину переполнения в переменной а? Обратите внимание, что b больше, чем a.
static void Main(string[] args)
{
int i = 2;
long a = 1024 * 1024 * 1024 * i;
long b = 12345678901234567;
System.Console.WriteLine("{0}", a);
System.Console.WriteLine("{0}", b);
System.Console.WriteLine("{0}", long.MaxValue);
}
-2147483648
12345678901234567
9223372036854775807
Press any key to continue . . .
Спасибо! * * 1004