I was trying to create copy of objects in silverligth 5 where interfaces like IFormatters and IcCloanble do not support. *
My objects are like this: (No
Implement the DataContractSerializer attributes (DataContract, DataMember) on your classes and call DatacontractSerializer to serialize it to a MemoryStream, then use it again to serialize out of the MemoryStream to a new instance of the object. By far the easiest to understand, and quite performant too.
Example of class definition :
[DataContract]
class MyClass
{
[DataMember]
public int MyValue {get;set;}
[DataMember]
public string MyOtherValue {get;set;}
}
The method of cloning from one class instance to another is covered in the Microsoft documentation http://msdn.microsoft.com/en-us/library/ms752244(v=vs.110).aspx