C#
C# 자료형 데이터 형식 범위
잉여씨
2018. 11. 21. 15:10
정수 계열 형식 표(C# 참조)
https://docs.microsoft.com/ko-kr/dotnet/csharp/language-reference/keywords/integral-types-table
형식 | 범위 |
sbyte | -128 ~ 127 |
byte | 0 ~ 255 |
char | U+0000 ~ U+ffff |
short | –32,768 ~ 32,767 |
ushort | 0 ~ 65,535 |
int | –2,147,483,648 ~ 2,147,483,647 |
uint | 0 ~ 4,294,967,295 |
long | –9,223,372,036,854,775,808 ~ 9,223,372,036,854,775,807 |
ulong | 0 ~ 18,446,744,073,709,551,615 |
부동 소수점 형식 표(C# 참조)
형식 | 근사 범위 |
float | ±1.5 x 10−45 ~ ±3.4 x 1038 |
double | ±5.0 × 10−324 ~ ±1.7 × 10308 |
decimal | ±1.0 x 10-28 ~ ±7.9228 x 1028 |