BaseEncodingGetCharCount Method | CryptSharp |
When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes from the specified byte array.
Namespace: CryptSharp.Utility
Assembly: CryptSharp (in CryptSharp.dll) Version: 2.1.0.0
Syntax
public override int GetCharCount( byte[] bytes, int index, int count )
Public Overrides Function GetCharCount ( bytes As Byte(), index As Integer, count As Integer ) As Integer
public: virtual int GetCharCount( array<unsigned char>^ bytes, int index, int count ) override
abstract GetCharCount : bytes : byte[] * index : int * count : int -> int override GetCharCount : bytes : byte[] * index : int * count : int -> int
Parameters
- bytes
- Type: SystemByte
The byte array containing the sequence of bytes to decode. - index
- Type: SystemInt32
The index of the first byte to decode. - count
- Type: SystemInt32
The number of bytes to decode.
Return Value
Type: Int32The number of characters produced by decoding the specified sequence of bytes.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | bytes is null. |
ArgumentOutOfRangeException | index or count is less than zero.-or- index and count do not denote a valid range in bytes. |
DecoderFallbackException | A fallback occurred (see Understanding Encodings for complete explanation)-and-DecoderFallback is set to DecoderExceptionFallback. |
See Also