C# 常用的数据类型包括:

  1. 整数类型 (Integer):包括 'sbyte'、'byte'、'short'、'ushort'、'int'、'uint'、'long'、'ulong'。

  2. 浮点数类型 (Floating-Point):包括 'float'、'double'、'decimal'。

  3. 字符类型 (Character):包括 'char'。

  4. 布尔类型 (Boolean):包括 'bool'。

  5. 字符串类型 (String):包括 'string'。

  6. 枚举类型 (Enumeration):包括 'enum'。

  7. 数组类型 (Array):包括 数组。

  8. 结构类型 (Structure):包括 'struct'。

  9. 类类型 (Class):包括 'class'。

  10. 接口类型 (Interface):包括 'interface'。

  11. 委托类型 (Delegate):包括 'delegate'。

  12. 对象类型 (Object):包括 'object'。

这些数据类型可以用于声明变量、参数和返回值,以及用于定义类的成员。

C# 常用数据类型详解 - 变量、参数、返回值定义

原文地址: https://www.cveoy.top/t/topic/pXIq 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录