This is my KeyValue collection
KeyValuePairCollection<int,string> KV=new KeyValuePairCollection<int,string>();
KV.Key = 1;
KV.Value = "Chapter1";
KV.Key = 2;
KV.Value = "Chapter2";
KV.Key = 3;
KV.Value="Chapter3";
I serialized the collection using the code below
StreamWriter txtWrt=null;
string m_ArraylstfileName = @"d:\XML\GenericsKV.xml";
XmlSerializer xmlPerSerlzr =
new XmlSerializer(typeof(KeyValuePairCollection<int,string>));
txtWrt = new StreamWriter(m_ArraylstfileName);
xmlPerSerlzr.Serialize(txtWrt, KV);
My xml file stores the final entry only ( i.e Key=3 ,Value="chapter3" )
Suggestion please.