Programming

.Net Tips – Xml Serialize or Deserialize Dictionary in C#

If you try to serialize/deserialize a type which uses the generic Dictionary<TKey, TValue> type with the XmlSerializer then you’ll get an InvalidOperationException, for instance: Here’s my class: I’ll get an InvalidOperationException with an inner exception of type NotSupportedException when I do this: And the error message of the NotSupportedException is: “Cannot serialize member MyClass.MyDictionary of …

.Net Tips – Xml Serialize or Deserialize Dictionary in C# Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close