Before I begin, I'm aware there are several other questions that 'answer' this question, but not in a way that I can quite understand. Here's what I'm referring to: Deep copying in C#
Why Copying in C# is a terrible idea
I've done a fair bit of research and I was hoping someone could explain to me how to set objects to the value of another object.
For example, let's say:
myObject bob;
bob = new myObject();
myObject joe
joe = bob
From what I can research, joe
now points to bob's instance of bob
. Do these objects still behave independently?
How would I create two objects, copy the contents of one to another, and have them be two separate objects, whose fields, methods and events occur separately?
I'm sorry for asking this question again, but I can't seem to find an explanation that makes sense to me anywhere else.