Basics of Serialization in .NET Framework 3.0
page 1 of 6
Published: 13 Dec 2007
Abstract
In this article Uday examines the different types of serializations possible with .NET Framework 3.0 including a comparison between basic serialization and custom serialization.
by Uday Denduluri
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 36412/ 87

Introduction

Serialization is the process of converting an object into a stream of bytes. We generally perform serialization for persisting an object and saving a state of an object. The persisted location can be a file or a database. In .NET Framework when an object is serialized it not only persists the data, but also persists some metadata. If an object is serialized it also persists its Type information, Assembly information, etc. De-serialization is the reverse process of serialization, where a serialized object is again made to be an active object.

In this article we will discuss different types of serializations with code snippets wherever necessary. A web service is completely based on the XML serialization and SOAP. We will discuss more about the XML serialization in detail.


View Entire Article

User Comments

Title: Incorrect information   
Name: Bob
Date: 2008-04-22 6:00:25 PM
Comment:
this article states that :
----------------------------
NonSerializedAttribute – If a class is marked as Serializable then all the properties can be serialized. For example, if we have a User object that has properties like user name, password [not in encrypted format], role of the user, etc. then such kinds of crucial information can be leaked out if serialized. We have the NonSerializable attribute that helps us in marking a property as not serializable.
--------------------------------
however, this is totally incorrect. You cannot use the NonSerializable attribute on a Property. It is for fields only, and will generate a compiler error.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2017 ASPAlliance.com  |  Page Processed at 2017-11-22 1:14:52 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search