AspNet.sk     Diskusné fóra     Vitajte v QuickStarts     ASP.NET     Silverlight     Ako môžem...? (en)     Class prehliadač Príklady chcem v ...   
Menu
Skip Navigation Links.

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

[This sample can be found at H:\Home\WU_000036_efe47225c86ca62f325a01d8519bc002\Webs\aspnet.sk\quickstarts\QuickStartv20\howto\samples\Serialization\ISerializable\
To build this sample, open the SDK command prompt and navigate to the above path. Build the sample using the build tool msbuild passing the solution file as the first parameter: msbuild mySample.sln. The compiled executable will be found in the sub directory \bin directory.]




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


Microsoft .NET Framework SDK QuickStart Tutorials Version 2.0
Copyright © 2005 Microsoft Corporation. All rights reserved.
Preklad do slovenského jazyka - Copyright © 2005 - 2007 www.aspnet.sk, www.qsh.sk
Pošlite komentár k tejto stránke
Copyright © 2002 - 2008 Chastia, spol. s r. o., Igor Stanek, Designed by Lacino
Portál je hostovaný na serveroch firmy Quantasoft - www.qsh.sk.