开发者

default assignment operator

开发者 https://www.devze.com 2023-01-27 07:24 出处:网络
Is there defau开发者_JAVA百科lt assignment operator in c#?Unlike C++, C# does not allow you to override the assignment operator.

Is there defau开发者_JAVA百科lt assignment operator in c#?


Unlike C++, C# does not allow you to override the assignment operator.

For reference types, writing x = y will set x to refer to the same object (or null) that y does.

For value types, writing x = y will copy the fields in the y value to the x value.

0

精彩评论

暂无评论...
验证码 换一张
取 消