The question is: at the end of this code the value of ptArray[0].X is 3.33 or 1.11?
Thanks.
class MyPoint
{
public double X, Y;
public MyPoint(double x, double y)
{
X = x;
Y = y;
}
}
MyPoint[] ptArray = new MyPoint[2];
ptArray[0] = new MyPoint(1.11, 2.22);
MyPoint first = ptArray[0];
// Am I changing ptArray[0] here or not?
first.X = 3.33;
first.Y = 4.44;