Compartilhar via


Campo Marshal.SystemDefaultCharSize

 

Dica

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Representa o tamanho de caractere padrão do sistema; o padrão é 2 para sistemas Unicode e 1 para sistemas ANSI. Este campo é somente leitura.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (em mscorlib.dll)

Sintaxe

public static readonly int SystemDefaultCharSize
public:
static initonly int SystemDefaultCharSize
static val SystemDefaultCharSize : int
Public Shared ReadOnly SystemDefaultCharSize As Integer

Valor do Campo

Type: System.Int32

Exemplos

O exemplo a seguir demonstra o SystemDefaultCharSize campo. Este exemplo de código é parte de um exemplo maior fornecido para a Marshal classe.

// 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);

Informações de Versão

Plataforma Universal do Windows
Disponível desde 8
.NET Framework
Disponível desde 1.1
Biblioteca de Classes Portátil
Com suporte no: plataformas portáteis do .NET
Silverlight
Disponível desde 2.0
Windows Phone Silverlight
Disponível desde 7.0
Windows Phone
Disponível desde 8.1

Confira Também

PtrToStringAuto
StringToHGlobalAuto
StringToCoTaskMemAuto
Classe Marshal
Namespace System.Runtime.InteropServices

Retornar ao início