Share via


Marshal.SystemDefaultCharSize 欄位

定義

表示系統上的預設字元大小;Unicode 系統的預設值為 2,ANSI 系統為 1。 此欄位為唯讀。

public: static initonly int SystemDefaultCharSize;
public static readonly int SystemDefaultCharSize;
 staticval mutable SystemDefaultCharSize : int
Public Shared ReadOnly SystemDefaultCharSize As Integer 

欄位值

範例

下列範例示範 SystemDefaultCharSize 欄位。 此程式代碼範例是針對 類別提供的較大範例的 Marshal 一部分。

// Demonstrate the use of public static fields of the Marshal
// class.
Console::WriteLine(
    "SystemDefaultCharSize={0},SystemMaxDBCSCharSize={1}",
    Marshal::SystemDefaultCharSize,
    Marshal::SystemMaxDBCSCharSize);
// Demonstrate the use of public static fields of the Marshal class.
Console.WriteLine("SystemDefaultCharSize={0}, SystemMaxDBCSCharSize={1}",
    Marshal.SystemDefaultCharSize, Marshal.SystemMaxDBCSCharSize);
' Demonstrate the use of public static fields of the Marshal class.
Console.WriteLine("SystemDefaultCharSize={0}, SystemMaxDBCSCharSize={1}", Marshal.SystemDefaultCharSize, Marshal.SystemMaxDBCSCharSize)

適用於

另請參閱