C# type conversion inconsistent?

前端 未结 0 1825
夕颜
夕颜 2021-02-11 15:51

In C#, I cannot implicitly convert a long to an int.

long l = 5;
int i = l;  // CS0266: Cannot implicitly convert type \'long\' to \'in         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题