Answer Posted / rad
public static T DeepCopy<T>(T obj)
{
object result = null;
using (var ms = new MemoryStream())
{
var formatter = new BinaryFormatter();
formatter.Serialize(ms, obj);
ms.Position = 0;
result = (T)formatter.Deserialize(ms);
ms.Close();
}
return (T)result;
}
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
What is the difference between asp.net and mvc?
What is full form of asp.net?
Will the asp.net validators run in server side or client side?
Is data edited in the Repeater control?
What is session object? Describe in detail.
How you can access the values from the Repeater control in ASP.NET?
How do sessions work?
How do u optimize a query in asp.net?
What parameters can you pass in the url of the api?
What is data reader in asp.net?
What is active web pages?
What is ashx file in asp.net?
Explain difference between dataset and datareader?
Why do we use sessions?
Why is global asax is used?