BaseEncoding.GetByteCount Method

CryptSharp

BaseEncodingGetByteCount Method CryptSharp
When overridden in a derived class, calculates the number of bytes produced by encoding a set of characters from the specified character array.

Namespace: CryptSharp.Utility
Assembly: CryptSharp (in CryptSharp.dll) Version: 2.1.0.0
Syntax

public override int GetByteCount(
	char[] chars,
	int index,
	int count
)
Public Overrides Function GetByteCount ( 
	chars As Char(),
	index As Integer,
	count As Integer
) As Integer
public:
virtual int GetByteCount(
	array<wchar_t>^ chars, 
	int index, 
	int count
) override
abstract GetByteCount : 
        chars : char[] * 
        index : int * 
        count : int -> int 
override GetByteCount : 
        chars : char[] * 
        index : int * 
        count : int -> int 

Parameters

chars
Type: SystemChar
The character array containing the set of characters to encode.
index
Type: SystemInt32
The index of the first character to encode.
count
Type: SystemInt32
The number of characters to encode.

Return Value

Type: Int32
The number of bytes produced by encoding the specified characters.
Exceptions

ExceptionCondition
ArgumentNullExceptionchars is null.
ArgumentOutOfRangeExceptionindex or count is less than zero.-or- index and count do not denote a valid range in chars.
EncoderFallbackExceptionA fallback occurred (see Understanding Encodings for complete explanation)-and-EncoderFallback is set to EncoderExceptionFallback.
See Also

Reference