变量定义

定义

C# 数据类型

描述

变量分为以下几种类型:

值类型(Value types)
引用类型(Reference types)
指针类型(Pointer types)

参数

参数名 类型 描述
bool bool 布尔值 True 或 False
byte byte 8 位无符号整数
char char 16 位 Unicode 字符
decimal decimal 128 位精确的十进制值,28-29 有效位数
double double 64 位双精度浮点型
float float 32 位单精度浮点型
int int 32 位有符号整数类型
long long 64 位有符号整数类型
uint uint 32 位无符号整数类型

返回值

返回值 类型 描述
无返回值

示例