Using XML Serialization on a List<T>
I have a struct that I seralize via XML Serialization. It contains a list of KeyValuePair<T, K>. How do I serlize this via XML appropriately? All my items serialize correctly except it doesn't contain the data for my list.
It's declared as such
VB Code:
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>> MyList = new List<KeyValuePair<string,string>>();
Re: Using XML Serialization on a List<T>
Serializing a simple List<T> works fine with XML Serialization. The problem is if I use a KeyValuePair in it. To work around this issue, I may just use a structure instead of a KeyValuePair because that would work fine.
Though if anyone has any suggestions please let me know.