Element.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 the specified name has attribute; otherwise, false.

See Also