B
Bruce Vander Werf
Because Rectangle is a value type, I know I can do this:
Rectangle rect1, rect2;
rect1.Top = 34;
rect2 = rect1; //copies members
rect1.Top = 46; //does not affect rect2
But what about an object that provides static members, like IQAddress?
IQAdress addr1, addr2;
addr1 = IPAddress.None; //creates addr1 on heap?
addr2 = IPAddress.Broadcast; //creates addr2 on heap?
addr2 = addr1; //copying a pointer?
addr1.ScopeId = 5; //also changes addr2?
addr2 = IPAddress.Loopback; //creates a new pointer on the heap?
I would appreciate any insight on this.
--Bruce
Rectangle rect1, rect2;
rect1.Top = 34;
rect2 = rect1; //copies members
rect1.Top = 46; //does not affect rect2
But what about an object that provides static members, like IQAddress?
IQAdress addr1, addr2;
addr1 = IPAddress.None; //creates addr1 on heap?
addr2 = IPAddress.Broadcast; //creates addr2 on heap?
addr2 = addr1; //copying a pointer?
addr1.ScopeId = 5; //also changes addr2?
addr2 = IPAddress.Loopback; //creates a new pointer on the heap?
I would appreciate any insight on this.
--Bruce