HasAttribute

Element.HasAttribute method

Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.

public bool HasAttribute(string name)
ParameterTypeDescription
nameStringThe attribute name.

Return Value

True if has attribute with the name; otherwise, false.

See Also