Re: [.NET] 請問資料型態中的double 跟decimal
VB.NET 資料型態
關鍵字 CLR 型別結構 資料長度
Boolean System.Boolean 2 Bytes
Byte System.Byte 1 Bytes
Char System.Char 2 Bytes
Date System.DateTime 8 Bytes
Decimal System.Decimal 16 Bytes
Double System.Double 8 Bytes
Integer System.Int32 4 Bytes
Long System.Int64 8 Bytes
Object System.Object (類別) 4 Bytes
Short System.Int16 2 Bytes
Single System.Single 4 Bytes
String System.String (類別)
User-Defined Type (繼承自 System.ValurType)
資料數值範圍
Boolean True 或 False。
Byte 0 至 255 (無正負號)。
Char 0 至 65535 (無正負號)。
Date 01/01/01 00:00:00 至 9999/12/31 23:59:59
Decimal 整數範圍 0 至 +/-79,228,162,514,264,337,593,543,950,335
浮點數範圍 0 至+/-7.9228162514264337593543950335 共 28 個小數位數
最小的非零值 +/-0.0000000000000000000000000001 (+/-1E-28)
Double 負值為 -1.79769313486231570E+308 至 -4.94065645841246544E-324
正值為 4.94065645841246544E-324 至 1.79769313486231570E+308。
Integer -2,147,483,648 至 2,147,483,647。
Long -9,223,372,036,854,775,808 至 9,223,372,036,854,775,807。
Short -32,768 至 32,767。
Single 負值為 -3.4028235E+38 至 -1.401298E-45
正值為 1.401298E-45 至 3.4028235E+38。
String 0 至大約二十億個 Unicode 字元。(2,147,483,648)
Object、User-Defined Type 由實際儲存資料決定其大小
參考 MSDN Library Online
資料型別摘要
http://msdn.microsoft.com/library/CHT/vblr7/html/vagrpdatatype.asp
不同語言的資料型別對照
http://tinyurl.com/al3tb
--
▃▅▇▆▄ ▆▂▃ `
逝去感情如何能留住,半點癡情遺留殊不易,██▅▇▄▃ ▇▃▂" .
█████████▃i ▁▄▇
更多悽悽慘慘的遭遇…………██▆▃ █▅▆▃ˍ▄*
◢ ▂█▄▇▅▂▌.
我不知道,王~八~蛋~~! ▂▆███ █▄▃ 。fumizuki。Check。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 210.58.156.43
→
04/16 11:15, , 1F
04/16 11:15, 1F
推
04/16 14:50, , 2F
04/16 14:50, 2F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
Visual_Basic 近期熱門文章
PTT數位生活區 即時熱門文章