I feel rather ignorant asking about this, but can someone explain to me why this is happening?
class MyClass {public int i {get; set; }}
class program
{
static void Main (string [] args)
{
MyClass a = new MyClass ();
MyClass b = new MyClass ();
bi = 2;
a = b;
ai = 1;
Console.Write (bi + "\ n"); // Outputs 1
}
}It makes sense to me if I use pointers and all these wonderful things, but I got the impression that with C #, that "b" would remain independent of "a".
Am I just using some terribly bad practice? Can someone point me to something that explains why this is so in C #?
Thank.