Reads the text contents of an element into a character buffer. This method is designed to read large streams of embedded text by calling it successively.
[Visual Basic] MustOverride Public Function ReadChars( _ ByVal buffer() As Char, _ ByVal index As Integer, _ ByVal count As Integer _ ) As Integer [C#] public abstract int ReadChars( char[] buffer, int index, int count ); [C++] public: virtual int ReadChars( __wchar_t* buffer[], int index, int count ) = 0; [JScript] public abstract function ReadChars( buffer : Char[], index : int, count : int ) : int;
The number of characters read. This can be zero if there is no more text content to return in the current context.
This is the most efficient way to process very large streams of text embedded in an XML document as opposed to allocating large String objects. This method returns text content a buffer at a time. For example, suppose you have the following element:
XmlReader Class | XmlReader Members | System.NewXml Namespace