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 a postback ispostback and autopostback in asp net?
How to find last error which occurred?
What is the use of placeholder control? Can we see it at runtime?
How Can assign alias name for ASP.NET Web API Action?
What is query string? What are its advantages and limitations?
How would you get asp.net running in apache web servers?
Explain the different types of directives in .net?
What is ASLM?
Define data caching?
What is hidden field in asp.net?
What are the different types of proxy patterns?
What is the difference between abstract class vs interface? Can give me the real time examples?
Describe the sequence of action takes place on the server when ASP.NET application starts first time?
What are the cookies types in asp.net?
How do you deploy your asp.net application?