在数据库上浮到?在.NET数据库、NET

2023-09-03 05:54:29 作者:猛虎隱身山

如果你有一个的MSSQLServer浮动,以你怎么在.NET中映射呢?

If you have a float in MSSQLServer, to what do you map this in .NET?

你能转换为双人间或将你输数?

Can you convert it to Double or will you lose numbers?

推荐答案

SQLServer的浮动和C#/ VB 具有相同的重presentation。这是正确的映射。你不想做的就是地图的SQL Server 浮动为C#/ VB 浮动因为这可能涉及亏损的precision。 SQL Server的真正映射到C#/ VB 浮动

SQLServer float and C#/VB double have the same representation. This is the correct mapping. What you don't want to do is map SQL Server float to C#/VB float as that may involve a loss of precision. SQL Server real maps onto C#/VB float.

T-SQL float和real类型定义可以在 MSDN 被发现。 C#的双重定义可以在 MSDN 为好,因为可以浮动的