XmlReader.IsName Method (String)

 

Returns a value indicating whether the string argument is a valid XML name.

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

public static bool IsName(
	string str
)

Parameters

str
Type: System.String

The name to validate.

Return Value

Type: System.Boolean

true if the name is valid; otherwise, false.

Exception Condition
ArgumentNullException

The str value is null.

This method uses the W3C XML 1.0 Recommendation to determine whether the name is valid.

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: