R
raylopez99
In C++, you have symbolic overriding of "+", "=", etc, which C# also
has. This question is not really about that.
Rather, in C#, when you say:
MyObject X = new MyObject();
MyObject Y = new MyObject();
X = Y; //what does this '=' mean?
Is "X=Y" a shallow copy? I think it is.
So is X=Y above equivalent to using ICloneable to produce a shallow
copy clone ("return (this.MemberwiseClone());"), or is it more like a
deep copy ("return (BinaryFormatter1.Deserialize(memStream));")?
RL
has. This question is not really about that.
Rather, in C#, when you say:
MyObject X = new MyObject();
MyObject Y = new MyObject();
X = Y; //what does this '=' mean?
Is "X=Y" a shallow copy? I think it is.
So is X=Y above equivalent to using ICloneable to produce a shallow
copy clone ("return (this.MemberwiseClone());"), or is it more like a
deep copy ("return (BinaryFormatter1.Deserialize(memStream));")?
RL