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 state management technique?
I have created a configuration setting in my web.config and have kept it at the root level. How do I prevent it from being overridden by another web.config that appears lower in the hierarchy?
Whta are the Various steps taken to optimize a web based application (caching, stored procedure etc.) ?
How to Separate background image and front image from original picture....
What is server side routing?
Give some salient points of difference between request processor and request dispatcher.
What is DataGrid wheater its a Server Control or something else ?
1.What r collections? 2.What is .pdb file? 3.Is it possible to provide access to users in master page? 4.What is dirty n Phantom Read(SQL)? 5.What r different isolation levels(SQL)? 6.How to set authentication mode in web.config file?
Which type if caching will be used if we want to cache the portion of a page instead of whole page?
What are early binding and late binding.
What is the use of data set in asp.net?
Explain a program using code nuggets to create a simple application? : asp.net mvc
Are xaml file compiled or built on runtime?
Will session work if cookies is disabled?
What does postback mean?