Element.ToggleAttribute

ToggleAttribute(string)

If force is not given, “toggles” qualifiedName, removing it if it is present and adding it if it is not present. If force is true, adds qualifiedName. If force is false, removes qualifiedName.

public bool ToggleAttribute(string qualifiedName)
ParameterTypeDescription
qualifiedNameStringThe attribute QualifiedName.

Return Value

Returns true if qualifiedName is now present; otherwise false.

See Also


ToggleAttribute(string, bool)

If force is not given, “toggles” qualifiedName, removing it if it is present and adding it if it is not present. If force is true, adds qualifiedName. If force is false, removes qualifiedName.

public bool ToggleAttribute(string qualifiedName, bool force)
ParameterTypeDescription
qualifiedNameStringThe attribute QualifiedName.
forceBooleanThe force option to toggle attribute.

Return Value

Returns true if qualifiedName is now present; otherwise false.

See Also