XmlSerialization and List
I have the following c开发者_如何学编程lass
public class Notifications : List<Notification> { }
Unfortunately, when it's serialized it looks like
<ArrayOfNotification>
  <Notification>
  ...
How can I get that root node to be Notifications? I've tried a few different attributes on the class, but none compile.
Try
using System.Xml.Serialization;
...
[XmlType(TypeName="Notifications")]
public class Notifications ...
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论