Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

learning C# ... about objects and the = oper

Name: Anonymous 2006-04-26 23:26

            Poop x = new Poop(6);
            Poop y = new Poop(123);
           
            x.Print();  // output is 6
            y.Print();  // output is 123
           
            x = y;      // was object copied from y to x?
            x.Print();  // output is 123
            y.Print();  // output is 123
           
            y.P = 5555; // well, let's see...
            x.Print();  // output is 5555 *
            y.Print();  // output is 5555
           
                        // no -- x now references same object that y is
// so objects are treated as pointers... no biggie
            //  ... but how do I use = in a "copy" kind of way?

Name: Anonymous 2006-04-27 17:16

def = o
    o = self
end

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List