0

I've struggled to add a name/value or dictionary entry into the Settings.settings file in a VS2010 project. Unfortunantly, the built-in designer doesn't allow you to easily enter data for these types for some reason (the namespace is System.Collections.Specialized).

I want to manually add one of these data types (e.g. ListDictionary or StringDicitonary), but I can't find a reference XSD to describe the XML pattern to serialize the data.

Where can this information be found? Ideally, it'd be an XSD containing all .NET types or sub-types. I thought this should be simple to find, but it's been daunting so far.

I realize I could write a small program to serialize each of these datatypes, and create a list of examples, but this seems like it should aleady exist somewhere.

TonyH
  • 1,117
  • 8
  • 18
  • From your question it is not really clear to me what you want to achieve. You want to serialize some data? XML Serialisation has serious problems with that, it accepts only IList implementations and cannot do any interfaces and no non public members. – Mare Infinitus Jun 23 '12 at 20:39
  • I want to know what XSD VS2010 uses to represent different data types in the settings.settings file, along with app.config file. – TonyH Jun 24 '12 at 00:06
  • lmgtfy: https://www.google.com/search?q=serialize%20dictionary%20to%20xml%20c%23 – Cheeso Jun 26 '12 at 03:33
  • I want an easy to edit XML config file, where I can store collections of settings. VS2010 has built in tools for building config files (the project settings menu), which I'd like to retain. The tool lets you enter name/value pairs, and you can choose the value type, including arrays, lists, dictionaries. However, for many types, (e.g. dictionaries) after choosing the type, the dialog for adding data is blank and unusable. For a generic list, it works fine, as you can add objects(though they remain undefined) I'm starting a new thread on this. – TonyH Jun 26 '12 at 15:19

0 Answers0