3434namespace GameFrameX . Foundation . Extensions ;
3535
3636/// <summary>
37- /// 常量型变量的字节数
38- /// 提供了常用基础数据类型的字节大小常量值
37+ /// 常量型变量的字节数。
38+ /// 提供了常用基础数据类型的字节大小常量值。
3939/// </summary>
40+ /// <remarks>
41+ /// Byte sizes of constant types.
42+ /// Provides constant values for the byte sizes of common base data types.
43+ /// </remarks>
4044public static class ConstBaseTypeSize
4145{
4246 /// <summary>
4347 /// 整型变量(32 位)的字节数。
44- /// 取值范围:-2,147,483,648 到 2,147,483,647
48+ /// 取值范围:-2,147,483,648 到 2,147,483,647。
4549 /// </summary>
50+ /// <remarks>
51+ /// Byte size of integer variable (32-bit).
52+ /// Value range: -2,147,483,648 to 2,147,483,647.
53+ /// </remarks>
4654 public const int IntSize = sizeof ( int ) ;
4755
4856 /// <summary>
4957 /// 短整型变量(16 位)的字节数。
50- /// 取值范围:-32,768 到 32,767
58+ /// 取值范围:-32,768 到 32,767。
5159 /// </summary>
60+ /// <remarks>
61+ /// Byte size of short integer variable (16-bit).
62+ /// Value range: -32,768 to 32,767.
63+ /// </remarks>
5264 public const int ShortSize = sizeof ( short ) ;
5365
5466 /// <summary>
5567 /// 长整型变量(64 位)的字节数。
56- /// 取值范围:-9,223,372,036,854,775,808 到 9,223,372,036,854,775,807
68+ /// 取值范围:-9,223,372,036,854,775,808 到 9,223,372,036,854,775,807。
5769 /// </summary>
70+ /// <remarks>
71+ /// Byte size of long integer variable (64-bit).
72+ /// Value range: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
73+ /// </remarks>
5874 public const int LongSize = sizeof ( long ) ;
5975
6076 /// <summary>
6177 /// 单精度浮点型变量的字节数。
62- /// 精度:约7位十进制数字
63- /// 取值范围:±1.5 x 10^-45 到 ±3.4 x 10^38
64- /// </summary>
78+ /// 精度:约 7 位十进制数字。
79+ /// 取值范围:±1.5 x 10^-45 到 ±3.4 x 10^38。
80+ /// </summary>
81+ /// <remarks>
82+ /// Byte size of single-precision floating-point variable.
83+ /// Precision: approximately 7 decimal digits.
84+ /// Value range: ±1.5 x 10^-45 to ±3.4 x 10^38.
85+ /// </remarks>
6586 public const int FloatSize = sizeof ( float ) ;
6687
6788 /// <summary>
6889 /// 双精度浮点型变量的字节数。
69- /// 精度:约15-17位十进制数字
70- /// 取值范围:±5.0 × 10^-324 到 ±1.7 × 10^308
71- /// </summary>
90+ /// 精度:约 15-17 位十进制数字。
91+ /// 取值范围:±5.0 × 10^-324 到 ±1.7 × 10^308。
92+ /// </summary>
93+ /// <remarks>
94+ /// Byte size of double-precision floating-point variable.
95+ /// Precision: approximately 15-17 decimal digits.
96+ /// Value range: ±5.0 × 10^-324 to ±1.7 × 10^308.
97+ /// </remarks>
7298 public const int DoubleSize = sizeof ( double ) ;
7399
74100 /// <summary>
75101 /// 字节型变量(8 位)的字节数。
76- /// 取值范围:0 到 255
77- /// 常用于处理二进制数据和文件操作
78- /// </summary>
102+ /// 取值范围:0 到 255。
103+ /// 常用于处理二进制数据和文件操作。
104+ /// </summary>
105+ /// <remarks>
106+ /// Byte size of byte variable (8-bit).
107+ /// Value range: 0 to 255.
108+ /// Commonly used for handling binary data and file operations.
109+ /// </remarks>
79110 public const int ByteSize = sizeof ( byte ) ;
80111
81112 /// <summary>
82113 /// 有符号字节类型变量的字节数。
83- /// 取值范围:-128 到 127
114+ /// 取值范围:-128 到 127。
84115 /// </summary>
116+ /// <remarks>
117+ /// Byte size of signed byte variable.
118+ /// Value range: -128 to 127.
119+ /// </remarks>
85120 public const int SbyteSize = sizeof ( sbyte ) ;
86121
87122 /// <summary>
88123 /// 布尔型变量的字节数。
89- /// 仅存储 true 或 false 两种状态
124+ /// 仅存储 true 或 false 两种状态。
90125 /// </summary>
126+ /// <remarks>
127+ /// Byte size of boolean variable.
128+ /// Stores only two states: true or false.
129+ /// </remarks>
91130 public const int BoolSize = sizeof ( bool ) ;
92131
93132 /// <summary>
94133 /// 无符号整型变量(32 位)的字节数。
95- /// 取值范围:0 到 4,294,967,295
134+ /// 取值范围:0 到 4,294,967,295。
96135 /// </summary>
136+ /// <remarks>
137+ /// Byte size of unsigned integer variable (32-bit).
138+ /// Value range: 0 to 4,294,967,295.
139+ /// </remarks>
97140 public const int UIntSize = sizeof ( uint ) ;
98141
99142 /// <summary>
100143 /// 无符号短整型变量(16 位)的字节数。
101- /// 取值范围:0 到 65,535
144+ /// 取值范围:0 到 65,535。
102145 /// </summary>
146+ /// <remarks>
147+ /// Byte size of unsigned short integer variable (16-bit).
148+ /// Value range: 0 to 65,535.
149+ /// </remarks>
103150 public const int UShortSize = sizeof ( ushort ) ;
104151
105152 /// <summary>
106153 /// 无符号长整型变量(64 位)的字节数。
107- /// 取值范围:0 到 18,446,744,073,709,551,615
154+ /// 取值范围:0 到 18,446,744,073,709,551,615。
108155 /// </summary>
156+ /// <remarks>
157+ /// Byte size of unsigned long integer variable (64-bit).
158+ /// Value range: 0 to 18,446,744,073,709,551,615.
159+ /// </remarks>
109160 public const int ULongSize = sizeof ( ulong ) ;
110161
111162 /// <summary>
112163 /// 字符型变量(16 位 Unicode)的字节数。
113- /// 取值范围:U+0000 到 U+FFFF
114- /// 用于存储单个 Unicode 字符
115- /// </summary>
164+ /// 取值范围:U+0000 到 U+FFFF。
165+ /// 用于存储单个 Unicode 字符。
166+ /// </summary>
167+ /// <remarks>
168+ /// Byte size of character variable (16-bit Unicode).
169+ /// Value range: U+0000 to U+FFFF.
170+ /// Used for storing a single Unicode character.
171+ /// </remarks>
116172 public const int CharSize = sizeof ( char ) ;
117173
118174 /// <summary>
119175 /// 高精度十进制浮点型变量的字节数。
120- /// 精度:28-29位十进制数字
121- /// 取值范围:±1.0 × 10^-28 到 ±7.9228 × 10^28
122- /// 适用于金融计算等需要高精度的场景
123- /// </summary>
176+ /// 精度:28-29 位十进制数字。
177+ /// 取值范围:±1.0 × 10^-28 到 ±7.9228 × 10^28。
178+ /// 适用于金融计算等需要高精度的场景。
179+ /// </summary>
180+ /// <remarks>
181+ /// Byte size of high-precision decimal floating-point variable.
182+ /// Precision: 28-29 decimal digits.
183+ /// Value range: ±1.0 × 10^-28 to ±7.9228 × 10^28.
184+ /// Suitable for scenarios requiring high precision such as financial calculations.
185+ /// </remarks>
124186 public const int DecimalSize = sizeof ( decimal ) ;
125187
126188 /// <summary>
127189 /// 日期时间类型变量的字节数。
128- /// 表示从公元1年1月1日午夜12:00:00到9999年12月31日晚上11:59:59之间的日期和时间
129- /// 精度:100纳秒(0.1微秒)
130- /// </summary>
190+ /// 表示从公元 1 年 1 月 1 日午夜 12:00:00 到 9999 年 12 月 31 日晚上 11:59:59 之间的日期和时间。
191+ /// 精度:100 纳秒(0.1 微秒)。
192+ /// </summary>
193+ /// <remarks>
194+ /// Byte size of DateTime variable.
195+ /// Represents dates and times from midnight 12:00:00, January 1, 1 AD to 11:59:59 PM, December 31, 9999 AD.
196+ /// Precision: 100 nanoseconds (0.1 microseconds).
197+ /// </remarks>
131198 public const int DateTimeSize = 8 ; // DateTime 是 8 字节
132199
133200 /// <summary>
134201 /// 全局唯一标识符(GUID)的字节数。
135- /// 128位(16字节)的唯一标识符
136- /// 格式:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
137- /// </summary>
202+ /// 128 位(16 字节)的唯一标识符。
203+ /// 格式:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx。
204+ /// </summary>
205+ /// <remarks>
206+ /// Byte size of Globally Unique Identifier (GUID).
207+ /// 128-bit (16-byte) unique identifier.
208+ /// Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
209+ /// </remarks>
138210 public const int GuidSize = 16 ; // Guid 是 16 字节
139211
140212 /// <summary>
141213 /// 时间跨度类型变量的字节数。
142- /// 表示时间间隔,精度为100纳秒(0.1微秒)
143- /// 取值范围:-10,675,199天到10,675,199天
144- /// </summary>
214+ /// 表示时间间隔,精度为 100 纳秒(0.1 微秒)。
215+ /// 取值范围:-10,675,199 天到 10,675,199 天。
216+ /// </summary>
217+ /// <remarks>
218+ /// Byte size of TimeSpan variable.
219+ /// Represents a time interval with a precision of 100 nanoseconds (0.1 microseconds).
220+ /// Value range: -10,675,199 days to 10,675,199 days.
221+ /// </remarks>
145222 public const int TimeSpanSize = 8 ; // TimeSpan 是 8 字节
146223}
0 commit comments