public static T DeepCopy<T>(T other)
{
using (MemoryStream ms = new MemoryStream())
{
BinaryFormatter formatter = new BinaryFormatter();
formatter.Serialize(ms, other);
ms.Position = 0;
return (T)formatter.Deserialize(ms);
}
}
Monday, December 8, 2014
DeepCopy of objects
Monday, January 20, 2014
C# Difference between Object , Var and Dynamic keywords
Go through the below link
http://msdn.microsoft.com/en-us/magazine/gg598922.aspx
http://msdn.microsoft.com/en-us/magazine/gg598922.aspx
Subscribe to:
Posts (Atom)