how to copy all of one objects values into another object of the same class.

Sep 1 2008 5:27 PM
I have a class called Piece
and it has some values.

In my code i have two objects currentPiece and tempPiece.

I want to say currentPiece = tempPiece.

But it doesnt seem to work... I can do currentPiece.x[0,0] = tempPiece.x[0,0];

But i have a few arrays and varibles in my class. do i ahve to do one piece at a time? is there no way to just say everything from object one go into object two?

Answers (2)