Export (0) Print
Expand All

XmlNodeReader Class

Represents a reader that provides fast, non-cached forward only access to XML data in an XmlNode.

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

public class XmlNodeReader : XmlReader, 
	IXmlNamespaceResolver

The XmlNodeReader type exposes the following members.

  NameDescription
Public methodSupported by the XNA FrameworkXmlNodeReaderCreates an instance of the XmlNodeReader class using the specified XmlNode.
Top

  NameDescription
Public propertySupported by the XNA FrameworkAttributeCountGets the number of attributes on the current node. (Overrides XmlReader.AttributeCount.)
Public propertySupported by the XNA FrameworkBaseURIGets the base URI of the current node. (Overrides XmlReader.BaseURI.)
Public propertySupported by the XNA FrameworkCanReadBinaryContentGets a value indicating whether the XmlNodeReader implements the binary content read methods. (Overrides XmlReader.CanReadBinaryContent.)
Public propertySupported by the XNA FrameworkCanReadValueChunkGets a value indicating whether the XmlReader implements the ReadValueChunk method. (Inherited from XmlReader.)
Public propertySupported by the XNA FrameworkCanResolveEntityGets a value indicating whether this reader can parse and resolve entities. (Overrides XmlReader.CanResolveEntity.)

In XNA Framework 3.0, this member is inherited from XmlReader.CanResolveEntity.
Public propertySupported by the XNA FrameworkDepthGets the depth of the current node in the XML document. (Overrides XmlReader.Depth.)
Public propertySupported by the XNA FrameworkEOFGets a value indicating whether the reader is positioned at the end of the stream. (Overrides XmlReader.EOF.)
Public propertySupported by the XNA FrameworkHasAttributesGets a value indicating whether the current node has any attributes. (Overrides XmlReader.HasAttributes.)
Public propertySupported by the XNA FrameworkHasValueGets a value indicating whether the current node can have a Value. (Overrides XmlReader.HasValue.)
Public propertySupported by the XNA FrameworkIsDefaultGets a value indicating whether the current node is an attribute that was generated from the default value defined in the document type definition (DTD) or schema. (Overrides XmlReader.IsDefault.)
Public propertySupported by the XNA FrameworkIsEmptyElementGets a value indicating whether the current node is an empty element (for example, <MyElement/>). (Overrides XmlReader.IsEmptyElement.)
Public propertySupported by the XNA FrameworkItem[Int32]When overridden in a derived class, gets the value of the attribute with the specified index. (Inherited from XmlReader.)
Public propertySupported by the XNA FrameworkItem[String]When overridden in a derived class, gets the value of the attribute with the specified Name. (Inherited from XmlReader.)
Public propertySupported by the XNA FrameworkItem[String, String]When overridden in a derived class, gets the value of the attribute with the specified LocalName and NamespaceURI. (Inherited from XmlReader.)
Public propertySupported by the XNA FrameworkLocalNameGets the local name of the current node. (Overrides XmlReader.LocalName.)
Public propertySupported by the XNA FrameworkNameGets the qualified name of the current node. (Overrides XmlReader.Name.)
Public propertySupported by the XNA FrameworkNamespaceURIGets the namespace URI (as defined in the W3C Namespace specification) of the node on which the reader is positioned. (Overrides XmlReader.NamespaceURI.)
Public propertySupported by the XNA FrameworkNameTableGets the XmlNameTable associated with this implementation. (Overrides XmlReader.NameTable.)
Public propertySupported by the XNA FrameworkNodeTypeGets the type of the current node. (Overrides XmlReader.NodeType.)
Public propertySupported by the XNA FrameworkPrefixGets the namespace prefix associated with the current node. (Overrides XmlReader.Prefix.)
Public propertySupported by the XNA FrameworkQuoteCharWhen overridden in a derived class, gets the quotation mark character used to enclose the value of an attribute node. (Inherited from XmlReader.)
Public propertySupported by the XNA FrameworkReadStateGets the state of the reader. (Overrides XmlReader.ReadState.)
Public propertySupported by the XNA FrameworkSchemaInfoGets the schema information that has been assigned to the current node. (Overrides XmlReader.SchemaInfo.)
Public propertySupported by the XNA FrameworkSettingsGets the XmlReaderSettings object used to create this XmlReader instance. (Inherited from XmlReader.)
Public propertySupported by the XNA FrameworkValueGets the text value of the current node. (Overrides XmlReader.Value.)
Public propertySupported by the XNA FrameworkValueTypeGets The Common Language Runtime (CLR) type for the current node. (Inherited from XmlReader.)
Public propertySupported by the XNA FrameworkXmlLangGets the current xml:lang scope. (Overrides XmlReader.XmlLang.)
Public propertySupported by the XNA FrameworkXmlSpaceGets the current xml:space scope. (Overrides XmlReader.XmlSpace.)
Top

  NameDescription
Public methodSupported by the XNA FrameworkCloseChanges the ReadState to Closed. (Overrides XmlReader.Close().)
Public methodDispose()Releases all resources used by the current instance of the XmlReader class. (Inherited from XmlReader.)
Protected methodSupported by the XNA FrameworkDispose(Boolean)Releases the unmanaged resources used by the XmlReader and optionally releases the managed resources. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodSupported by the XNA FrameworkFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by the XNA FrameworkGetAttribute(Int32)Gets the value of the attribute with the specified index. (Overrides XmlReader.GetAttribute(Int32).)
Public methodSupported by the XNA FrameworkGetAttribute(String)Gets the value of the attribute with the specified name. (Overrides XmlReader.GetAttribute(String).)
Public methodSupported by the XNA FrameworkGetAttribute(String, String)Gets the value of the attribute with the specified local name and namespace URI. (Overrides XmlReader.GetAttribute(String, String).)
Public methodSupported by the XNA FrameworkGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodSupported by the XNA FrameworkGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetValueAsyncAsynchronously gets the value of the current node. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkIsStartElement()Calls MoveToContent and tests if the current content node is a start tag or empty element tag. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkIsStartElement(String)Calls MoveToContent and tests if the current content node is a start tag or empty element tag and if the Name property of the element found matches the given argument. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkIsStartElement(String, String)Calls MoveToContent and tests if the current content node is a start tag or empty element tag and if the LocalName and NamespaceURI properties of the element found match the given strings. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkLookupNamespaceResolves a namespace prefix in the current element's scope. (Overrides XmlReader.LookupNamespace(String).)
Protected methodSupported by the XNA FrameworkMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by the XNA FrameworkMoveToAttribute(Int32)Moves to the attribute with the specified index. (Overrides XmlReader.MoveToAttribute(Int32).)
Public methodSupported by the XNA FrameworkMoveToAttribute(String)Moves to the attribute with the specified name. (Overrides XmlReader.MoveToAttribute(String).)
Public methodSupported by the XNA FrameworkMoveToAttribute(String, String)Moves to the attribute with the specified local name and namespace URI. (Overrides XmlReader.MoveToAttribute(String, String).)
Public methodSupported by the XNA FrameworkMoveToContentChecks whether the current node is a content (non-white space text, CDATA, Element, EndElement, EntityReference, or EndEntity) node. If the node is not a content node, the reader skips ahead to the next content node or end of file. It skips over nodes of the following type: ProcessingInstruction, DocumentType, Comment, Whitespace, or SignificantWhitespace. (Inherited from XmlReader.)
Public methodMoveToContentAsyncAsynchronously checks whether the current node is a content node. If the node is not a content node, the reader skips ahead to the next content node or end of file. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkMoveToElementMoves to the element that contains the current attribute node. (Overrides XmlReader.MoveToElement().)
Public methodSupported by the XNA FrameworkMoveToFirstAttributeMoves to the first attribute. (Overrides XmlReader.MoveToFirstAttribute().)
Public methodSupported by the XNA FrameworkMoveToNextAttributeMoves to the next attribute. (Overrides XmlReader.MoveToNextAttribute().)
Public methodSupported by the XNA FrameworkReadReads the next node from the stream. (Overrides XmlReader.Read().)
Public methodReadAsyncAsynchronously reads the next node from the stream. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadAttributeValueParses the attribute value into one or more Text, EntityReference, or EndEntity nodes. (Overrides XmlReader.ReadAttributeValue().)
Public methodSupported by the XNA FrameworkReadContentAsReads the content as an object of the type specified. (Inherited from XmlReader.)
Public methodReadContentAsAsyncAsynchronously reads the content as an object of the type specified. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadContentAsBase64Reads the content and returns the Base64 decoded binary bytes. (Overrides XmlReader.ReadContentAsBase64(Byte[], Int32, Int32).)
Public methodReadContentAsBase64AsyncAsynchronously reads the content and returns the Base64 decoded binary bytes. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadContentAsBinHexReads the content and returns the BinHex decoded binary bytes. (Overrides XmlReader.ReadContentAsBinHex(Byte[], Int32, Int32).)
Public methodReadContentAsBinHexAsyncAsynchronously reads the content and returns the BinHex decoded binary bytes. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadContentAsBooleanReads the text content at the current position as a Boolean. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadContentAsDateTimeReads the text content at the current position as a DateTime object. (Inherited from XmlReader.)
Public methodReadContentAsDateTimeOffsetReads the text content at the current position as a DateTimeOffset object. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadContentAsDecimalReads the text content at the current position as a Decimal object. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadContentAsDoubleReads the text content at the current position as a double-precision floating-point number. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadContentAsFloatReads the text content at the current position as a single-precision floating point number. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadContentAsIntReads the text content at the current position as a 32-bit signed integer. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadContentAsLongReads the text content at the current position as a 64-bit signed integer. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadContentAsObjectReads the text content at the current position as an Object. (Inherited from XmlReader.)
Public methodReadContentAsObjectAsyncAsynchronously reads the text content at the current position as an Object. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadContentAsStringReads the text content at the current position as a String object. (Inherited from XmlReader.)
Public methodReadContentAsStringAsyncAsynchronously reads the text content at the current position as a String object. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAs(Type, IXmlNamespaceResolver)Reads the element content as the requested type. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAs(Type, IXmlNamespaceResolver, String, String)Checks that the specified local name and namespace URI matches that of the current element, then reads the element content as the requested type. (Inherited from XmlReader.)
Public methodReadElementContentAsAsyncAsynchronously reads the element content as the requested type. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsBase64Reads the element and decodes the Base64 content. (Overrides XmlReader.ReadElementContentAsBase64(Byte[], Int32, Int32).)
Public methodReadElementContentAsBase64AsyncAsynchronously reads the element and decodes the Base64 content. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsBinHexReads the element and decodes the BinHex content. (Overrides XmlReader.ReadElementContentAsBinHex(Byte[], Int32, Int32).)
Public methodReadElementContentAsBinHexAsyncAsynchronously reads the element and decodes the BinHex content. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsBoolean()Reads the current element and returns the contents as a Boolean object. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsBoolean(String, String)Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a Boolean object. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsDateTime()Reads the current element and returns the contents as a DateTime object. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsDateTime(String, String)Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a DateTime object. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsDecimal()Reads the current element and returns the contents as a Decimal object. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsDecimal(String, String)Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a Decimal object. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsDouble()Reads the current element and returns the contents as a double-precision floating-point number. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsDouble(String, String)Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a double-precision floating-point number. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsFloat()Reads the current element and returns the contents as single-precision floating-point number. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsFloat(String, String)Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a single-precision floating-point number. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsInt()Reads the current element and returns the contents as a 32-bit signed integer. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsInt(String, String)Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a 32-bit signed integer. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsLong()Reads the current element and returns the contents as a 64-bit signed integer. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsLong(String, String)Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a 64-bit signed integer. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsObject()Reads the current element and returns the contents as an Object. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsObject(String, String)Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as an Object. (Inherited from XmlReader.)
Public methodReadElementContentAsObjectAsyncAsynchronously reads the current element and returns the contents as an Object. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsString()Reads the current element and returns the contents as a String object. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementContentAsString(String, String)Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a String object. (Inherited from XmlReader.)
Public methodReadElementContentAsStringAsyncAsynchronously reads the current element and returns the contents as a String object. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementString()Reads a text-only element. However, we recommend that you use the ReadElementContentAsString() method instead, because it provides a more straightforward way to handle this operation. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementString(String)Checks that the Name property of the element found matches the given string before reading a text-only element. However, we recommend that you use the ReadElementContentAsString() method instead, because it provides a more straightforward way to handle this operation. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadElementString(String, String)Checks that the LocalName and NamespaceURI properties of the element found matches the given strings before reading a text-only element. However, we recommend that you use the ReadElementContentAsString(String, String) method instead, because it provides a more straightforward way to handle this operation. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadEndElementChecks that the current content node is an end tag and advances the reader to the next node. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadInnerXmlWhen overridden in a derived class, reads all the content, including markup, as a string. (Inherited from XmlReader.)
Public methodReadInnerXmlAsyncAsynchronously reads all the content, including markup, as a string. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadOuterXmlWhen overridden in a derived class, reads the content, including markup, representing this node and all its children. (Inherited from XmlReader.)
Public methodReadOuterXmlAsyncAsynchronously reads the content, including markup, representing this node and all its children. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadStartElement()Checks that the current node is an element and advances the reader to the next node. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadStartElement(String)Checks that the current content node is an element with the given Name and advances the reader to the next node. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadStartElement(String, String)Checks that the current content node is an element with the given LocalName and NamespaceURI and advances the reader to the next node. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadStringReads the contents of an element or text node as a string. (Overrides XmlReader.ReadString().)
Public methodSupported by the XNA FrameworkReadSubtreeReturns a new XmlReader instance that can be used to read the current node, and all its descendants. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadToDescendant(String)Advances the XmlReader to the next descendant element with the specified qualified name. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadToDescendant(String, String)Advances the XmlReader to the next descendant element with the specified local name and namespace URI. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadToFollowing(String)Reads until an element with the specified qualified name is found. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadToFollowing(String, String)Reads until an element with the specified local name and namespace URI is found. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadToNextSibling(String)Advances the XmlReader to the next sibling element with the specified qualified name. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadToNextSibling(String, String)Advances the XmlReader to the next sibling element with the specified local name and namespace URI. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkReadValueChunkReads large streams of text embedded in an XML document. (Inherited from XmlReader.)
Public methodReadValueChunkAsyncAsynchronously reads large streams of text embedded in an XML document. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkResolveEntityResolves the entity reference for EntityReference nodes. (Overrides XmlReader.ResolveEntity().)
Public methodSupported by the XNA FrameworkSkipSkips the children of the current node. (Overrides XmlReader.Skip().)
Public methodSkipAsyncAsynchronously skips the children of the current node. (Inherited from XmlReader.)
Public methodSupported by the XNA FrameworkToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Explicit interface implemetationPrivate methodSupported by the XNA FrameworkIDisposable.DisposeFor a description of this member, see IDisposable.Dispose. (Inherited from XmlReader.)
Explicit interface implemetationPrivate methodSupported by the XNA FrameworkIXmlNamespaceResolver.GetNamespacesInScopeInfrastructure. For a description of this member, see GetNamespacesInScope.
Explicit interface implemetationPrivate methodSupported by the XNA FrameworkIXmlNamespaceResolver.LookupNamespaceInfrastructure. For a description of this member, see LookupNamespace.
Explicit interface implemetationPrivate methodSupported by the XNA FrameworkIXmlNamespaceResolver.LookupPrefixInfrastructure. For a description of this member, see IXmlNamespaceResolver.LookupPrefix.
Top

NoteNote

Instead of using the XmlNodeReader, we recommend that you create XmlReader instances by using the XmlReaderSettings class and the Create method. This enables you to take advantage of conformance checking and compliance to the XML 1.0 recommendation.

The XmlNodeReader has the ability to read an XML DOM subtree. This class does not support document type definition (DTD) or schema validation. However, you can create an XmlReader object that wraps around the XmlNodeReader object to validate the data stored in the XmlNodeReader object, as shown in Examples section.

In the following example, an XML file is loaded into an XML document and modified. The XML document is passed to an XmlNodeReader, which is then passed to the XmlReader.Create method. When the validating reader parses the file, it can validate any changes made to the XML file.

using System;
using System.Xml;
using System.Xml.Schema;
using System.IO;

public class Sample {

  public static void Main() {

    // Create and load the XML document.
    XmlDocument doc = new XmlDocument();
    doc.Load("booksSchema.xml");

    // Make changes to the document.
    XmlElement book = (XmlElement) doc.DocumentElement.FirstChild;
    book.SetAttribute("publisher", "Worldwide Publishing");

    // Create an XmlNodeReader using the XML document.
    XmlNodeReader nodeReader = new XmlNodeReader(doc);

    // Set the validation settings on the XmlReaderSettings object.
    XmlReaderSettings settings = new XmlReaderSettings();
    settings.ValidationType = ValidationType.Schema;
    settings.Schemas.Add("urn:bookstore-schema", "books.xsd");
    settings.ValidationEventHandler += new ValidationEventHandler (ValidationCallBack);

   // Create a validating reader that wraps the XmlNodeReader object.
   XmlReader reader = XmlReader.Create(nodeReader, settings);

   // Parse the XML file. 
   while (reader.Read());
  }

  // Display any validation errors. 
  private static void ValidationCallBack(object sender, ValidationEventArgs e) {
    Console.WriteLine("Validation Error: {0}", e.Message);
  }
}

Input

The following files are used as input.

<?xml version='1.0'?>
<bookstore xmlns="urn:bookstore-schema">
  <book genre="autobiography">
    <title>The Autobiography of Benjamin Franklin</title>
    <author>
      <first-name>Benjamin</first-name>
      <last-name>Franklin</last-name>
    </author>
    <price>8.99</price>
  </book>
  <book genre="novel">
    <title>The Confidence Man</title>
    <author>
      <first-name>Herman</first-name>
      <last-name>Melville</last-name>
    </author>
    <price>11.99</price>
  </book>
</bookstore>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="urn:bookstore-schema"
    elementFormDefault="qualified"
    targetNamespace="urn:bookstore-schema">

 <xsd:element name="bookstore" type="bookstoreType"/>

 <xsd:complexType name="bookstoreType">
  <xsd:sequence maxOccurs="unbounded">
   <xsd:element name="book"  type="bookType"/>
  </xsd:sequence>
 </xsd:complexType>

 <xsd:complexType name="bookType">
  <xsd:sequence>
   <xsd:element name="title" type="xsd:string"/>
   <xsd:element name="author" type="authorName"/>
   <xsd:element name="price"  type="xsd:decimal"/>
  </xsd:sequence>
  <xsd:attribute name="genre" type="xsd:string"/>
 </xsd:complexType>

 <xsd:complexType name="authorName">
  <xsd:sequence>
   <xsd:element name="first-name"  type="xsd:string"/>
   <xsd:element name="last-name" type="xsd:string"/>
  </xsd:sequence>
 </xsd:complexType>

</xsd:schema>

Output

Validation Error: The 'publisher' attribute is not declared.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft