BaseEncoding GetChars 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.0.0.0
Syntax

public override int GetChars(
	byte[] bytes,
	int byteIndex,
	int byteCount,
	char[] chars,
	int charIndex
)

Parameters

bytes
Type:  OnlineSystem Byte 
The byte array containing the sequence of bytes to decode.
byteIndex
Type: OnlineSystem Int32
The index of the first byte to decode.
byteCount
Type: OnlineSystem Int32
The number of bytes to decode.
chars
Type:  OnlineSystem Char 
The character array to contain the resulting set of characters.
charIndex
Type: OnlineSystem Int32
The index at which to start writing the resulting set of characters.

Return Value

The actual number of characters written into chars.
Exceptions

ExceptionCondition
OnlineSystem ArgumentNullExceptionbytes is null.-or- chars is null.
OnlineSystem ArgumentOutOfRangeExceptionbyteIndex 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.
OnlineSystem ArgumentExceptionchars does not have enough capacity from charIndex to the end of the array to accommodate the resulting characters.
OnlineSystem.Text DecoderFallbackExceptionA fallback occurred (see Understanding Encodings for complete explanation)-and-OnlineDecoderFallback is set to OnlineDecoderExceptionFallback.
See Also