Share via


XmlAttribute.Specified Property

Definition

Gets a value that indicates whether the attribute is explicitly specified or derived from a default value in the document type definition (DTD) or schema.

public:
 property bool Specified { bool get(); };
bool Specified();
public bool Specified { get; }
var boolean = xmlAttribute.specified;
Public ReadOnly Property Specified As Boolean

Property Value

Boolean

bool

True if the attribute is explicitly specified; false if the attribute is derived from a default value.

Remarks

If you change the value of the attribute (even if it has the same value as the default value) then this property is automatically set to true. To re-specify the attribute as the default value from the DTD, you must delete the attribute. The implementation will then make a new attribute available with this property set to false and the default value (if one exists).

Applies to