Returns the number of bytes that the next call to GetBytes will produce if presented with the specified range of characters, when implemented by a subclass.
[Visual Basic] MustOverride Public Function GetByteCount( _ ByVal chars() As Char, _ ByVal index As Integer, _ ByVal count As Integer, _ ByVal flush As Boolean _ ) As Integer [C#] public abstract int GetByteCount( char[] chars, int index, int count, bool flush ); [C++] public: virtual int GetByteCount( __wchar_t* chars[], int index, int count, bool flush ) = 0; [JScript] public abstract function GetByteCount( chars : Char[], index : int, count : int, flush : Boolean ) : int;
The number of bytes the next call to Encoder.GetBytes will produce if presented with the specified range of characters and the specified value of flush.
The returned value takes into account the state in which the encoder was left following the last call to Encoder.GetBytes.
Exception Type | Condition |
---|---|
ArgumentNullException | If chars is a null reference (in Visual Basic Nothing). |
ArgumentOutOfRangeException | If index and count do not denote a valid range in the character array. |
The state of the encoder is not affected by a call to this method.