System.Xml.XmlTextReader.ReadBinHex Method

Decodes BinHex and returns the decoded binary bytes.

Syntax

public int ReadBinHex (byte[] array, int offset, int len)

Parameters

offset
The zero-based index into the array specifying where the method can begin to write to the buffer.
array
The byte array that serves as the buffer to which the decoded binary bytes are written.
offset
The zero-based index into the array specifying where the method can begin to write to the buffer.
len
The number of bytes to write into the buffer.

Returns

The number of bytes written to your buffer.

Exceptions

TypeReason
ArgumentNullException array is null.
ArgumentOutOfRangeException

offset < 0, or len < 0.

-or-

len > array.Length - offset.

System.Xml.XmlExceptionThe BinHex sequence is not valid.

Remarks

Note:

In the dnprdnext release, the recommended practice is to create System.Xml.XmlReader instances using the erload:System.Xml.XmlReader.Create method. This allows you to take full advantage of the new features introduced in this release. For more information, see Creating XML Readers.

Like XmlTextReader.ReadChars(Char[], int, int), this method can be called successively to read large streams of embedded text. It decodes BinHex content and returns the decoded binary bytes (for example, an inline BinHex encoded GIF image) into the buffer.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0