在数据库上浮到?在.NET [英] Float in Database to ? in .NET

查看:112
本文介绍了在数据库上浮到?在.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果你有一个的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 为好,因为可以浮动的definition

T-SQL float and real type definitions can be found at MSDN. C# double definition can be found at MSDN as well, as can the float definition.

这篇关于在数据库上浮到?在.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆