Name
XmlRootAttribute — System.Xml.Serialization (system.xml.dll) CF 1.0 class
Synopsis
public class XmlRootAttribute : Attribute { // Public Constructors public XmlRootAttribute( ); public XmlRootAttribute( string elementName); // Public Instance Properties public string DataType{set; get; } public string ElementName{set; get; } public bool IsNullable{set; get; } public string Namespace{set; get; } }
This
type is used to indicate the class that will be serialized to XML as
the root element. Its ElementName
property
indicates the name of the element to be serialized.
Hierarchy
System.Object
→
System.Attribute
→
XmlRootAttribute
Valid On
Class, Struct, Enum, Interface, ReturnValue
Get .NET & XML now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.