XmlAttributeOverrides.Item Property (Type)

 

Gets the object associated with the specified, base-class, type.

Namespace:   System.Xml.Serialization
Assembly:  System.Xml (in System.Xml.dll)

member Item : 
        type:Type -> XmlAttributes with get

Parameters

type
Type: System.Type

The base class Type that is associated with the collection of attributes you want to retrieve.

Property Value

Type: System.Xml.Serialization.XmlAttributes

An XmlAttributes that represents the collection of overriding attributes.

Use this overload to return an XmlAttributes object that contains attributes for an XmlRootAttribute or XmlTypeAttribute object.

If the XmlAttributes object contains objects that override an XmlArrayAttribute, XmlArrayItemAttribute, XmlElementAttribute, XmlEnumAttribute, or XmlAttributeAttribute, you must use the overload that specifies the overridden member as well as the type.

The following example creates an XmlAttributeOverrides object, an XmlAttributes object, and an XmlRootAttribute object. The example assigns the XmlRootAttribute to the XmlRoot property of the XmlAttributes object, and adds the XmlAttributes object to the XmlAttributeOverrides object. Lastly, the example gets the XmlAttributes object by passing the Type of the serialized class to the XmlAttributeOverrides object. In this example, the Type is Group.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: