These tutorials demonstrate selected features in ASP.NET version 2.0, but they are compatible with later versions of ASP.NET as well. For the current documentation, see the ASP.NET portal on the MSDN Web site.

 

 

   Welcome   |   ASP.NET   |   Web Services   |   Class Browser   
  |   I want my samples in...      

How Do I...? Common Tasks QuickStart Tutorial

How Do I...Use ISerializable to Customize the Serialization of a Class?



This sample illustrates how to use the ISerializable interface to customize the serialization of your own objects. This sample serializes objects based on the mscorlib assembly namespace tree structure. Each object contains a property as the name of the item and a list of children as per the real object in the mscorlib assembly. To demonstrate the customization possible with ISerializable, "(SAVED)" is appended to the namespace name to indicate that the values are not live. When the data is read back in, this tag could be modified or removed. Note: This sample requires the System.Runtime.Serialization.Formatters.Soap.dll.

Example

VB ISerializable.exe
View Source



Microsoft .NET Framework SDK QuickStart Tutorials Version 2.0
Copyright � 2005 Microsoft Corporation. All rights reserved.