ASCIIEncoding.IsSingleByte 屬性

定義

取得值,指出目前的編碼方式是否使用單一位元組字碼指標。

public:
 virtual property bool IsSingleByte { bool get(); };
public override bool IsSingleByte { get; }
[System.Runtime.InteropServices.ComVisible(false)]
public override bool IsSingleByte { get; }
member this.IsSingleByte : bool
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.IsSingleByte : bool
Public Overrides ReadOnly Property IsSingleByte As Boolean

屬性值

這個屬性一律會是 true

屬性

備註

IsSingleByte例如,使用 屬性來決定編碼作業的位元組陣列大小,以及解碼作業的字元陣列大小 (,因此位元組陣列的大小是 IsSingleByte * 要編碼的字元數) ,您應該針對編碼作業呼叫 GetByteCountGetMaxByteCount 方法,以及 GetCharCount 解碼作業的 或 GetMaxCharCount 方法。 這些方法會在 ASCIIEncoding 計算所需的陣列大小時,將物件的取代後援策略納入考慮。

適用於

另請參閱