Serialization………………

Serialization is a process where an object is converted to a form able to be stored or transported to a different place. Such purpose can be if we want to save our object’s data to a hard drive for example. Even more useful is its appliance when we want to send our object over some kind of network. Without serialization the remoting will be impossible.

C# Syntax

private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            
            BinaryFormatter binaryFormat = new BinaryFormatter();
            Stream fstream = new FileStream("data.dat",
                FileMode.Create, FileAccess.Write, FileShare.None);
            binaryFormat.Serialize(fstream, (textBox1.Text));
            fstream.Close();

        }

SHARE THE KNOWLEDGE


  

Advertisements

About Dinesh

I am engineering student........ I am selected in Microsoft Student Partner as MSP............

Posted on September 18, 2011, in .NET, C#, Knowledge. Bookmark the permalink. Leave a comment.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: