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 上下文中,可以使用指针访问内存地址

相关推荐
yngsqq12 小时前
批量裁剪——CAD一键根据裁剪框裁剪
c#
东边的小山15 小时前
python 图形界面多个WORD按名字排序合并成一个WORD
python·c#·word
大王小生1 天前
说说CSV文件和C#解析csv文件的几种方式
人工智能·c#·csv·csvhelper·csvreader
LongtengGensSupreme1 天前
C# 中监听 IPv6 回环地址----HttpListener
c#·ipv6·httplistener
zzcufo1 天前
多邻国学习笔记第五阶段第10-11部分
笔记·学习·c#
easyboot1 天前
C#使用pythonnet简单示例
开发语言·python·c#
刘欣的博客1 天前
c# winform 控件dock 停造位置、摆放顺序问题
c#·winform·dock停靠问题
Java程序员威哥1 天前
Arthas+IDEA实战:Java线上问题排查完整流程(Spring Boot项目落地)
java·开发语言·spring boot·python·c#·intellij-idea
easyboot2 天前
C#通过sqlsugar插入数据到postgresql
开发语言·c#
阿蒙Amon2 天前
C#每日面试题-break、continue和goto的区别
java·面试·c#