Why integer zero does not equal long zero?

后端 未结 6 719
天命终不由人
天命终不由人 2020-12-11 00:28

A strange piece of code I\'ve just discovered in C# (should also be true for other CLI languages using .NET\'s structs).



        
6条回答
  •  既然无缘
    2020-12-11 01:01

    C# doesn't do automatic casting. Equals function compares types as well as values. Much like === in JS.

提交回复
热议问题