"Double"和"Double"之间有有意义的区别吗?和“双"字样在.Net? [英] Is there a meaningful difference between "Double" and "double" in .Net?

查看:66
本文介绍了"Double"和"Double"之间有有意义的区别吗?和“双"字样在.Net?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于最佳做法,使用之间是否有有意义的区别

As regards best practices, is there a meaningful difference between using:

Double d;

double d;

我知道最佳做法充满矛盾,因此我知道答案可能会有所不同.我只想知道两者之间的实用差异.

I know best practices are fraught with contradictions, so I know the answers may vary here. I just want to know the pragmatic difference between the two.

推荐答案

没有区别. double只是C#中System.Double的别名.

There is no difference. double is just an alias for System.Double in C#.

请注意,VB.NET没有相同的别名(System.Int32为int,System.Double为double,等等),因此别名仅适用于C#,而不是整个.NET.

Note that VB.NET doesn't have the same aliasing (int for System.Int32, double for System.Double, etc), so the aliasing is just applicable to C#, not .NET as a whole.

这篇关于"Double"和"Double"之间有有意义的区别吗?和“双"字样在.Net?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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