C# Reset a property
- by Jeff
I'm writing a Clone function for a non serializeable object.For most objects I don't care if they are shallow copied as I won't be making any changes to them.
I start with a MemberwiseClone and this copies all the values and few objects like configuration dictionary over just fine but they are pointers.
EAVEntity newClone = (EAVEntity) this.MemberwiseClone();
newClone.EntityStorageID = Guid.NewGuid();
newClone.Controls.Clear();
So how do I reset a pointer so I can make them not point at the same location?