Mono Class Library: System.Text.ASCIIEncoding Overview | Members

System.Text.ASCIIEncoding.GetByteCount Method

Determines the exact number of bytes required to encode the specified string as ASCII-encoded characters.

public override int GetByteCount (string chars)

Parameters

chars
A string to encode as ASCII-encoded characters.

Returns

A int containing the number of bytes required to encode chars as ASCII-encoded characters.

Exceptions

TypeReason
ArgumentNullExceptionchars is null.

Remarks

Note: This method overrides Encoding.GetByteCount(Char[]).

Requirements

Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0