C# class Serialize comtents code example
Example: c# serialize
Tutorial obj = new Tutorial();
obj.ID = 1;
obj.Name = ".Net";
IFormatter formatter = new BinaryFormatter();
Stream stream = new FileStream(@"E:\ExampleNew.txt",FileMode.Create,FileAccess.Write);
formatter.Serialize(stream, obj);
stream.Close();