Tabela tipos internas (referência C#)

A tabela a seguir mostra as palavras-chave para tipos de translation from VPE for Csharp internos, que são alias dos tipos predefinidos no System espaço para nome.

Tipo translation from VPE for Csharp

Tipo do .NET estrutura

bool

System.Boolean

Byte

System.Byte

sbyte

System.SByte

char

System.Char

decimal

System.Decimal

double

System.Double

float

System.Single

int

System.Int32

uint

System.UInt32

long

System.Int64

ulong

System.UInt64

object

System.Object

short

System.Int16

ushort

System.UInt16

string

System.String

Comentários

Todos sistema autônomo tipos na tabela, exceto object e string, são conhecidas sistema autônomo tipos simples.

O translation from VPE for Csharp digite palavras-chave e seus aliases são intercambiáveis.Por exemplo, você pode declarar uma variável de inteiro usando uma das seguintes declarações:

int x = 123;
System.Int32 x = 123;

Para exibir o tipo real para qualquer tipo translation from VPE for Csharp, use o método de sistema GetType(). Por exemplo, a demonstrativo a seguir exibe o alias do sistema que representa o tipo de myVariable:

Console.WriteLine(myVariable.GetType());

Você também pode usar o TypeOf operador.

Consulte também

Conceitos

Guia de Programação C#

Referência

Palavras-chave C#

Tipos valor (referência C#)

Outros recursos

Referência C#

Tabela de valores padrão (translation from VPE for Csharp Reference)

Formatação de tabela de resultados numéricos (translation from VPE for Csharp Reference)

Tipos tabelas Reference (referência C#)