开发者

What type should I use in Database and Objects using Linq-to-SQL for floating point?

I have 2 fields and I need these to be a floating decimal point. I wonder what data type to use while I'm开发者_开发知识库 designing bottom-up Linq-to-SQL classes.

EG: one value is 1.427600, another value is 1765.030, both would be in the same property/column.


Use System.Decimal, if you require the accuracy.

Decimal will represent both your example values accurately.


Why not a float or decimal type?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜