BaseEncodingGetChars Method (Byte, Int32, Int32, Char, Int32) | CryptSharp |
When overridden in a derived class, decodes a sequence of bytes from the specified byte array into the specified character array.
Namespace: CryptSharp.Utility
Assembly: CryptSharp (in CryptSharp.dll) Version: 2.1.0.0
Syntax
public override int GetChars( byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex )
Public Overrides Function GetChars ( bytes As Byte(), byteIndex As Integer, byteCount As Integer, chars As Char(), charIndex As Integer ) As Integer
public: virtual int GetChars( array<unsigned char>^ bytes, int byteIndex, int byteCount, array<wchar_t>^ chars, int charIndex ) override
abstract GetChars : bytes : byte[] * byteIndex : int * byteCount : int * chars : char[] * charIndex : int -> int override GetChars : bytes : byte[] * byteIndex : int * byteCount : int * chars : char[] * charIndex : int -> int
Parameters
- bytes
- Type: SystemByte
The byte array containing the sequence of bytes to decode. - byteIndex
- Type: SystemInt32
The index of the first byte to decode. - byteCount
- Type: SystemInt32
The number of bytes to decode. - chars
- Type: SystemChar
The character array to contain the resulting set of characters. - charIndex
- Type: SystemInt32
The index at which to start writing the resulting set of characters.
Return Value
Type: Int32The actual number of characters written into chars.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | bytes is null.-or- chars is null. |
ArgumentOutOfRangeException | byteIndex or byteCount or charIndex is less than zero.-or- byteindex and byteCount do not denote a valid range in bytes.-or- charIndex is not a valid index in chars. |
ArgumentException | chars does not have enough capacity from charIndex to the end of the array to accommodate the resulting characters. |
DecoderFallbackException | A fallback occurred (see Understanding Encodings for complete explanation)-and-DecoderFallback is set to DecoderExceptionFallback. |
See Also