I'm playing a little bit with 2.0 and generics.
I have two classes
public class UserCollection : Collection<User>
{
}
public class User
{
public string Name;
}
Serializing this collection with XmlSerializer brings me
<UserCollection>
<User>
<Name/>
</User>
</UserCollection>
With the attribute [XmlRoot("Users")] in front of the collection I can
modify the "UserCollection"-Tag to "Users".
But how do I modify the "User"-Tag? From 1.1 I know to somewhere put a
[XmlArrayItem("MyUser")], but where to put it in 2.0? In front of User
it doesn't work.
--
Sleepless in Berlin
W. Schwenkner