When I do the following.. anything done to Person b modifies Person a (I thought doing this would clone Person b from Person a). I also have NO idea if changing Person a will change Person b after the linking. Due to my code right now, I can only see this in 1 direction.
Person a = new Person() { head = "big", feet = "small" };
Person b = a;
b.head = "small"; //now a.head = "small" too
Now if I do this instead.. Person a becomes completely separate.
Person b = new Person() { head = a.head, feet = a.feet };
Now this fine and kinda makes sense when comparing this behaviour to other things in C#. BUT, this could get very annoying with large objects.
Is there a way to shortcut this at all?
Such as:
Person b = a.Values;