Default Assignment Operator

Is there a default assignment operator in C #?

+3
source share
1 answer

Unlike C ++, C # does not allow overriding the assignment operator.

For reference types, the entry x = ywill set xto reference the same object (or null) that it does y.

For value types, the record x = ywill copy the fields in the value yinto the value x.

+8
source

Source: https://habr.com/ru/post/1777580/


All Articles