B
bill.gates.com
Dear Coders:
I have a hashtable,
Hashtable hash=new Hashtable();
and have a class, Pixels
class Pixels
{
public int[,] buf=new int[5,5];
..
..
..
}
when I set this
Pixels p=new Pixels;
p.buf[1,1]=0;
p.buf[2,2]=1;
hash[5]=p;
Pixels p2=hash[5];
!!! now all items of buf[,] are set to 1
I have a hashtable,
Hashtable hash=new Hashtable();
and have a class, Pixels
class Pixels
{
public int[,] buf=new int[5,5];
..
..
..
}
when I set this
Pixels p=new Pixels;
p.buf[1,1]=0;
p.buf[2,2]=1;
hash[5]=p;
Pixels p2=hash[5];
!!! now all items of buf[,] are set to 1