0
Answer

Properties

cityzen

cityzen

19y
1.6k
1
Hi folks, if I have a class A that has a property of type class B, is it good programming practice to simply say private B _B; public B b { get {return _B;} set {_B = value;} } or should my get return a copy of _B rather than _B itself? Likewise, should my set store a copy of the passed value rather than the value itself, given that it's an object reference? Ta