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 redirecting behavior?
Why do we need Sessions?
What is the difference between page-level caching and fragment caching?
What is autopostback in asp net?
How to create multi language website in asp.net mvc? : Asp.Net MVC
I want to connect a system in LAN and I want to access that. Whenever I am moving a mouse in my desktop, the similar thing has to happen in another system in which I have connected. I need coding for this in C# and ASP.NET Can anyone please help me. It is very urgent. Thanks in advance. My email id is manojkumarchallagundla@gmail.com Will you please?
What is session and application variable in asp net?
What are navigation controls? How many navigation controls are there in ASP.NET 4.0?
What is repository pattern in mvc.net? : asp.net mvc
Why should i prefer JSP over asp.net or any other web development language..??
Which object is used to encapsulate the state of the client and the browser in ASP.NET?
I’m having some trouble with cas. How can I diagnose my problem?
Which ASP.NET configuration options are supported in the ASP.NET implementation on the shared web hosting platform?
What is razor? : asp.net mvc
What is xaml? Are xaml file compiled or built on runtime?