This is an extension method that operates on different types of objects and creates its own copy.
This method is generic so it can clone different types of objects
public static T Clone<T>(this T source)
var dcs = new DataContractSerializer(typeof(T));
using (var ms = new System.IO.MemoryStream())
If you are not familiar with extension method then please refer to my previous blog