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
Explain what is an abstract class?
List the events in page life cycle.
What is the difference between application state and caching?
Can I have a unique key as foreign key?
When should I use server transfer and response redirect?
Why is this service branded with windows livetm?
Why should i prefer JSP over asp.net or any other web development language..??
How can we make sure that Web API returns JSON data only?
How ViewstateMac works?
How to set the pane area to transparent of a scrollPane component.?
What is the part of url?
1.how to encrpt query string in asp.net? 2.there are 10000 records then i wnat display 5000 records one gridview and 5000 records another grid view what is the process?
How can exception be handled with out the use of try catch?
What is viewstate? What does the “enableviewstate” property do?
What is ispostback property?