Was looking through a C# book today and come across something like this:
class Circle...
Circle c = x
Circle d = c
My understanding is:
o Both c,d contain the same value x
o But this is the exact same value of x
o Assignment d=c would do the same
o If I change part of c, then d also changes?
o And vice versa?
o Completely changing c, as in c=y, would still leave d == x?
o This is different behaviour from ordinary non-class variables
If I am correct, why would this ever be useful?
I assume there must be a way of duplicating the value when assigning?
Thanks
Bart