C# 常用数据类型详解 - 变量、参数、返回值定义
C# 常用的数据类型包括:
-
整数类型 (Integer):包括 'sbyte'、'byte'、'short'、'ushort'、'int'、'uint'、'long'、'ulong'。
-
浮点数类型 (Floating-Point):包括 'float'、'double'、'decimal'。
-
字符类型 (Character):包括 'char'。
-
布尔类型 (Boolean):包括 'bool'。
-
字符串类型 (String):包括 'string'。
-
枚举类型 (Enumeration):包括 'enum'。
-
数组类型 (Array):包括 数组。
-
结构类型 (Structure):包括 'struct'。
-
类类型 (Class):包括 'class'。
-
接口类型 (Interface):包括 'interface'。
-
委托类型 (Delegate):包括 'delegate'。
-
对象类型 (Object):包括 'object'。
这些数据类型可以用于声明变量、参数和返回值,以及用于定义类的成员。
原文地址: https://www.cveoy.top/t/topic/pXIq 著作权归作者所有。请勿转载和采集!