Advertisement
digioz

Serialize Deserialize 1 Usage

Oct 10th, 2012
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.37 KB | None | 0 0
  1. class1 loClass1Object = new class1();
  2. loClass1Object1.csProperty1 = "Value1";
  3. loClass1Object1.csProperty2 = "Value2";
  4.  
  5. string lsSerializedXml = SerializeObjectToString(loClass1Object1, typeof(class1));
  6. class1 loClass1Object2 = (class1)DeserializeStringToObject(lsSerializedXml, typeof(class1));
  7.  
  8. class class1
  9. {
  10.     public string csProperty1;
  11.     public string csProperty2;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement