SqlXml.CreateReader Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the value of the XML content of this SqlXml as a XmlReader.

Namespace:   System.Data.SqlTypes
Assembly:  System.Data (in System.Data.dll)

public XmlReader CreateReader()

Return Value

Type: System.Xml.XmlReader

A XmlReader-derived instance that contains the XML content. The actual type may vary (for example, the return value might be XmlTextReader) depending on how the information is represented internally, on the server.

Exception Condition

Attempt was made to access this property on a null instance of SqlXml.

If the SqlXml instance was initialized to null (Nothing in Visual Basic), this method returns null.

.NET Framework
Available since 2.0
Return to top