In C# how are new object instances created that are copies of existing ones instead of default ones.
For example:
door a = new door();
door b = a;
door c = new door(a);
b.open();
a.is_open(); // yes
b.is_open(); // yes
c.is_open(); // no
edit: In case it's usefull, I made this after accepting the answer and will post it here.
public class copyable // inherit from this to make you'r object copyable
{
public heading copy()
{
return (heading)MemberwiseClone();
}
}