Visual Basic

  1. Home
  2. Computing & Technology
  3. Visual Basic
photo of Dan Mabbutt

Dan's Visual Basic Blog

By Dan Mabbutt, About.com Guide to Visual Basic since 2002

Serialize in VB.NET

Saturday January 1, 2005

In an About Visual Basic interview with Keith Franklin, President and Chief Software Architect at Empowered Software Solutions, we asked, "What is the single most important innovation in VB .NET?" Without skipping a beat, Keith said, "Attributes and serialization. This gives VB .NET the ability do whatever needs to be done with VB .NET objects."

Serialization creates a persistent and portable object that can be stored to disk, or moved across a network. Serialization let's an object be recreated on whatever machine needs it. .NET provides a standard way of serializing and deserializing objects. Basic .NET serialization to XML, SOAP, and binary formats is easy-to-use, because programmers don't have to provide explicit serialization code, but it can be extended with custom serialization if the situation requires it. .NET serialization also captures the object metadata, which means that .NET applications on different platforms - such as Windows and Linux - can exchange and share serialized data in files.

This was one reason I was really glad when an About Visual Basic reader notified me that one of my main articles that covers serialization had a problem (see the next entry). But it got me to thinking about serialization as well ...

You might want to check out some of the details here about VB.NET's new serialization capability. Start first by understanding "attributes" as used in VB.NET in the article, Attributes in VB .NET. Since serialization is implemented using attributes, this four part short tutorial will get you ready for an article that might be one of the most poorly named tutorials on the site. I called it, Visual Basic .NET for Beginners ... but it's really about serialization in VB.NET. (I may have to do something about that!)

For an example of how serialization is actually used in VB.NET, let me recommend Using ADO .NET - First Principles. The last two pages show you how ADO supports serialization into an XML file to put real meaning behind what Keith pointed out. Enjoy!

Comments

No comments yet. Leave a Comment

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Discuss

Community Forum

Explore Visual Basic

By Category

About.com Special Features

Visual Basic

  1. Home
  2. Computing & Technology
  3. Visual Basic

©2009 About.com, a part of The New York Times Company.

All rights reserved.