default 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.
精彩评论