C# 数据类型

C# 数据类型

  • [一、整数类型(Integral Types)](#一、整数类型(Integral Types))
  • [二、浮点数类型(Floating-Point Types)](#二、浮点数类型(Floating-Point Types))
  • [三、字符类型(Character Type)](#三、字符类型(Character Type))
  • [四、布尔类型(Boolean Type)](#四、布尔类型(Boolean Type))
  • [五、字符串类型(String Type)](#五、字符串类型(String Type))
  • [六、对象类型(Object Type)](#六、对象类型(Object Type))
  • [七、枚举类型(Enumeration Type)](#七、枚举类型(Enumeration Type))
  • [八、结构类型(Struct Type)](#八、结构类型(Struct Type))
  • [九、数组类型(Array Type)](#九、数组类型(Array Type))
  • [十、Nullable 类型(Nullable Types)](#十、Nullable 类型(Nullable Types))
  • [十一、指针类型(Pointer Types)](#十一、指针类型(Pointer Types))

一、整数类型(Integral Types)

1.sbyte

8 位有符号整数。

2.byte

8 位无符号整数

3.short

16 位有符号整数

4.ushort

16 位无符号整数

5.int

32 位有符号整数

6.uint

32 位无符号整数

7.long

64 位有符号整数

8.ulong

64 位无符号整数

二、浮点数类型(Floating-Point Types)

1.float

32 位单精度浮点数

2.double

64 位双精度浮点数

3.decimal

128 位高精度十进制浮点数

三、字符类型(Character Type)

1.char

16 位 Unicode 字符

四、布尔类型(Boolean Type)

1.bool

表示真值(true 或 false)

五、字符串类型(String Type)

1.string

表示文本字符串

六、对象类型(Object Type)

1.object

所有类型的基类

七、枚举类型(Enumeration Type)

1.enum

一组具名的常数值

八、结构类型(Struct Type)

1.struct

用户定义的值类型

九、数组类型(Array Type)

1.

数组类型用于存储相同类型的元素的集合

十、Nullable 类型(Nullable Types)

1.Nullable

允许值类型存储 null 值

十一、指针类型(Pointer Types)

1.unsafe

unsafe 上下文中,可以使用指针访问内存地址

相关推荐
kylezhao201935 分钟前
C# TreeView 控件详解与应用
c#
FL16238631293 小时前
C# winform部署yolo26-obb旋转框检测的onnx模型演示源码+模型+说明
开发语言·c#
hoiii1879 小时前
C# 俄罗斯方块游戏
开发语言·游戏·c#
chao1898449 小时前
C#实现OMRON FINS-TCP协议与PLC通信
网络·tcp/ip·c#
ytttr87310 小时前
基于C# WinForms实现多窗口通信
开发语言·microsoft·c#
fengfuyao98510 小时前
基于C# WinForm实现的串口调试助手源码
开发语言·c#
weixin_4219947811 小时前
认识数据 - 变量与数据类型
c#·.net·.netcore
mudtools11 小时前
深入理解飞书 Webhook 签名验证:一次踩坑到填坑的完整记录
网络·c#·.net·飞书
Var_al11 小时前
Unity编辑器扩展:标准化UI组件快速创建工具开发指南
ui·unity·c#·编辑器
FL162386312912 小时前
[C#]winform使用纯opencvsharp部署yolo26-cls图像分类的onnx模型
开发语言·分类·c#