The easiest way is to let Biztalk do it for you:
Create a message using your .Net class - Message1
Create a variable using the same class - variable1
Receive the message.
In an expression shape:
variable1 = Message1;
This will deserialize the message into an object.
In a message assignment shape:
Message2 = variable1;
This will serialize the object into a message.
Alternatively you could pass the message to an external .Net class and use the XmlSerializer to do this.