Home / General / Quick Tip: Serializing an Object Field as an XML Attribute
digWin is a community news sharing site for Microsoft Techies. Share interesting news/links and rate them!

Quick Tip: Serializing an Object Field as an XML Attribute

The addition of the XML Serializer is one of the reasons I really love version 2 of the .NET Compact Framework.  I use the XML Serializer in very nearly every application I write; to save application state, data files, etc.  By default, the XML Serializer will create a child node for every field in a type.  For example, the following objectpublic class TestData{    public Int32 TestID;    public String Description;}becomes<TestData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml





Microsoft news, tips and tricks search

Comments


Post voted by 1 digWinners


Featured Links

User

Login | Register




Forgot Password?

Sponsor

Anti spam filter for mail servers
Anti spam, anti phishing and email management software for Exchange/SMTP/Lotus. Download a FREE trial!

Featured

Download Free Exchange Ebook

Categories

Upcoming NEW

Recent comments

Related Sites