Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ASCIIEncoding::IsSingleByte Property

 

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

Namespace:   System.Text
Assembly:  mscorlib (in mscorlib.dll)

public:
[ComVisibleAttribute(false)]
property bool IsSingleByte {
	virtual bool get() override;
}

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 takes the ASCIIEncoding object's replacement fallback strategy into account when calculating the required array size.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft