Click or drag to resize
EncodingGetChars Method (Byte, Int32, Char, Int32)
When overridden in a derived class, decodes a sequence of bytes starting at the specified byte pointer into a set of characters that are stored starting at the specified character pointer.

Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public virtual int GetChars(
	byte* bytes,
	int byteCount,
	char* chars,
	int charCount
)

Parameters

bytes
Type: SystemByte*
A pointer to the first byte to decode.
byteCount
Type: SystemInt32
The number of bytes to decode.
chars
Type: SystemChar*
A pointer to the location at which to start writing the resulting set of characters.
charCount
Type: SystemInt32
The maximum number of characters to write.

Return Value

Type: Int32
The actual number of characters written at the location indicated by the chars parameter.
Exceptions
ExceptionCondition
ArgumentNullExceptionbytes is null.-or- chars is null.
ArgumentOutOfRangeExceptionbyteCount or charCount is less than zero.
ArgumentExceptioncharCount is less than the resulting number of characters.
DecoderFallbackExceptionA fallback occurred (see Character Encoding in the .NET Framework for complete explanation)-and-DecoderFallback is set to DecoderExceptionFallback.
See Also