Results 1 to 2 of 2

Thread: ConfigurationSection vs XML Serialization

  1. #1

    Thread Starter
    Fanatic Member Jumpercables's Avatar
    Join Date
    Jul 2005
    Location
    Colorado
    Posts
    592

    ConfigurationSection vs XML Serialization

    I'm developing an application that will use a XML configuration file as the main engine for holding information that is required for the application.

    I had planned on using the .NET 2.0 configuration sections and developing custom ConfigurationSections and ConfigurationElements. But it got me thinking of what are the benefits of technology versus using an XSD Schema to create a serializable class that could load the XML.

    What are the benefits of using the .NET 2.0 ConfigurationSections / ConfigurationElements versus XML Serialization?

    Thanks

    C# - .NET 1.1 / .NET 2.0

    "Take everything I say with a grain of salt, sometimes I'm right, sometimes I'm wrong but in the end we've both learned something."
    _____________________
    Regular Expressions Library
    Connection String
    API Functions
    Database FAQ & Tutorial

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: ConfigurationSection vs XML Serialization

    Here's the cynical answer: XML is open to anybody. ConfigurationSections tie you to MS.

    Another option you might consider is binary serialization. It is somewhat easier to use than XML serialization, and works for all types, whereas XML serialization doesn't work (easily) for generics and some other types. XML would be readable/editable with a text editor, while binary files are not. That's pretty much the trade-off between those two.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width