Serialize a collection containing more than one type

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Russ1984
    New Member
    • Mar 2008
    • 1

    #1

    Serialize a collection containing more than one type

    Hi,

    Does anyone know how to serialize a collection containing more than one type to xml?
  • nateraaaa
    Recognized Expert Contributor
    • May 2007
    • 664

    #2
    Originally posted by Russ1984
    Hi,

    Does anyone know how to serialize a collection containing more than one type to xml?
    Have you tried adding the Serializable attribute above your class definition?

    Code:
     [Serializable] 
    public class Class1
    {
    }
    Nathan

    Comment

    Working...