When overridden in a derived class, encodes a set of characters from the specified character array into the specified byte array.
Namespace: CryptSharp.UtilityAssembly: CryptSharp (in CryptSharp.dll) Version: 2.0.0.0
Syntax
Parameters
- chars
- Type:
System Char
The character array containing the set of characters to encode.
- charIndex
- Type:
System Int32
The index of the first character to encode.
- charCount
- Type:
System Int32
The number of characters to encode.
- bytes
- Type:
System Byte
The byte array to contain the resulting sequence of bytes.
- byteIndex
- Type:
System Int32
The index at which to start writing the resulting sequence of bytes.
Return Value
The actual number of bytes written into bytes.Exceptions
Exception | Condition |
---|---|
![]() | chars is null.-or- bytes is null. |
![]() | charIndex or charCount or byteIndex is less than zero.-or- charIndex and charCount do not denote a valid range in chars.-or- byteIndex is not a valid index in bytes. |
![]() | bytes does not have enough capacity from byteIndex to the end of the array to accommodate the resulting bytes. |
![]() | A fallback occurred (see Understanding Encodings for complete explanation)-and-![]() ![]() |
See Also