System.Text.ASCIIEncoding.IsSingleByte Property

Gets a value indicating whether the current encoding uses single-byte code points.

Syntax

[System.Runtime.InteropServices.ComVisible(false)]
public override bool IsSingleByte { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Instead of using the ASCIIEncoding.IsSingleByte property to determine the size of a byte array for encoding operations and the size of a character array for decoding operations (for example, so that the size of the byte array is ASCIIEncoding.IsSingleByte * the number of characters to be encoded), you should call the ASCIIEncoding.GetByteCount(string) or ASCIIEncoding.GetMaxByteCount(int) method for encoding operations and the ASCIIEncoding.GetCharCount(Byte[], int, int) or ASCIIEncoding.GetMaxCharCount(int) method for decoding operations. These methods takes the System.Text.ASCIIEncoding object's replacement fallback strategy into account when calculating the required array size.

Requirements

Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0