BaseEncodingGetMaxByteCount Method | CryptSharp |
When overridden in a derived class, calculates the maximum number of bytes produced by encoding the specified number of characters.
Namespace: CryptSharp.Utility
Assembly: CryptSharp (in CryptSharp.dll) Version: 2.1.0.0
Syntax
public override int GetMaxByteCount( int charCount )
Public Overrides Function GetMaxByteCount ( charCount As Integer ) As Integer
public: virtual int GetMaxByteCount( int charCount ) override
abstract GetMaxByteCount : charCount : int -> int override GetMaxByteCount : charCount : int -> int
Parameters
- charCount
- Type: SystemInt32
The number of characters to encode.
Return Value
Type: Int32The maximum number of bytes produced by encoding the specified number of characters.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | charCount is less than zero. |
EncoderFallbackException | A fallback occurred (see Understanding Encodings for complete explanation)-and-EncoderFallback is set to EncoderExceptionFallback. |
See Also