This topic has not yet been rated - Rate this topic

ASCIIEncoding.IsSingleByte Property

Updated: March 2011

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

Namespace:  System.Text
Assembly:  mscorlib (in mscorlib.dll)
[ComVisibleAttribute(false)]
public override bool IsSingleByte { get; }

Property Value

Type: System.Boolean
This property is always true.

Instead of using the 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 IsSingleByte * the number of characters to be encoded), you should call the GetByteCount or GetMaxByteCount method for encoding operations and the GetCharCount or GetMaxCharCount method for decoding operations. These methods take the ASCIIEncoding object's replacement fallback strategy into account when calculating the required array size.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Date

History

Reason

March 2011

Revised the Remarks section.

Information enhancement.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ