When overridden in a derived class, encodes the specified binary bytes as BinHex and writes out the resulting text.
Type Reason ArgumentNullException buffer is null. ArgumentException The buffer length minus index is less than count. ArgumentOutOfRangeException index or count is less than zero. InvalidOperationException The XmlWriter.WriteState is WriteState.Closed.
For the asynchronous version of this method, see XmlWriter.WriteBinHexAsync(Byte[], int, int).