Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
When overridden in a derived class, decodes a sequence of bytes from the specified byte array into a set of characters.
Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Overridable Function GetChars ( _
bytes As Byte(), _
byteIndex As Integer, _
byteCount As Integer _
) As Char()
public virtual char[] GetChars(
byte[] bytes,
int byteIndex,
int byteCount
)
public:
virtual array<wchar_t>^ GetChars(
array<unsigned char>^ bytes,
int byteIndex,
int byteCount
)
abstract GetChars :
bytes:byte[] *
byteIndex:int *
byteCount:int -> char[]
override GetChars :
bytes:byte[] *
byteIndex:int *
byteCount:int -> char[]
public function GetChars(
bytes : byte[],
byteIndex : int,
byteCount : int
) : char[]
Parameters
- bytes
Type: array<System. . :: . .Byte> [] () [] []
The byte array containing the sequence of bytes to decode.
- byteIndex
Type: System. . :: . .Int32
The index of the first byte to decode.
- byteCount
Type: System. . :: . .Int32
The number of bytes to decode.
Return Value
Type: array<System. . :: . .Char> [] () [] []
A character array containing the results of decoding the specified sequence of bytes.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | bytes is null Nothing nullptr unit a null reference (Nothing in Visual Basic) . |
ArgumentOutOfRangeException | byteIndex or byteCount is less than zero. -or- byteIndex and byteCount do not denote a valid range in bytes. |
DecoderFallbackException | A fallback occurred (see Understanding Encodings for complete explanation) -and- DecoderFallback is set to DecoderExceptionFallback. |
Remarks
Encoding..::..GetChars gets characters from an input byte sequence. Encoding..::..GetChars is different than Decoder.GetChars because Encoding expects discrete conversions, while Decoder is designed for multiple passes on a single input stream.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.