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?
精彩评论