I have a List(Of KeyValuePair(Of String, Object))
that i need to serialize to a XML string.
Note that Object
can be one of i. ArrayList
ii.String
I am using .net framework 4.5 .
I tried looking at examples available but am unable to implement it myself. Can someone post some kind of simple example. I am a newbie.
Dim lst As List(Of KeyValuePair(Of String, Object)) = fvPairs.ToList
Dim serializer As New XmlSerializer(lst.GetType)
Dim stringWriter As StringWriter = New StringWriter()
serializer.Serialize(stringWriter, lst)