Why does this return 0?
本问题已经有最佳答案,请猛点这里访问。
1 2 3 4 5 6 7 8 9 10 11 12 13 | using System; namespace test_warmup { class Program { static void Main(string[] args) { int test = -1110835200; test = test * 1700397056; Console.WriteLine(test); } } } |
以十六进制显示,即
在C#中,
换句话说,该乘法的结果太大而无法放入您要为其分配的变量中,而适合的部分全为零。