Code using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.Serialization;
namespace project123 { [Serializable] class Class1 { string _str;
[NonSerialized] string _str2;
publicstring Str { get { return _str; } set { _str = value; } } } }
Code using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Diagnostics; using System.Runtime.Serialization.Formatters.Binary;
namespace project123 { class Program { staticvoid Main(string[] args) { Class1 c =new Class1(); c.Str ="abc";
System.IO.MemoryStream ms =new System.IO.MemoryStream();