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 best Macanism to clear the Cache in asp.net
What is the function of the ViewState property?
Differences between “dataset” and “datareader”.
How do u declare static variable and how it is declared and what is its lifetime?
Contrast oop and soa. What are tenets of each16. How does the xmlserializer work? What acl permissions does a process using it require?
Explain the features that make asp.net more used framework? : asp.net mvc
What is sql data source control in asp.net?
In which situation can you not use a viewstate?
Can we have a web application running without web.config file?
code for "For every 5days system has to create 1text file with the corresponding date and it has to store in c-drive" by using web applications
What permissions do asp.net applications posses by default?
What are demand-paging and pre-paging?
How Session outproc in Sqlserver stored?
Can we create a multiple user simultaneously ?
How do u optimize a query in asp.net?