为什么没有INT过载SqlFunctions.StringConvert [英] Why is there no int overload for SqlFunctions.StringConvert
问题描述
标题pretty的多总结起来。我敢打赌,超过这个方法在野外的一半,用途包括铸造的人一个int到一个小数或双为了使用它,那么为什么不只是有一个重载接受一个int作为参数?
Title pretty much sums it up. I'd bet that over half the usage of this method in the wild involves someone casting an int to a decimal or double in order to use it, so why isn't there just an overload that takes an int as the argument?
<一个href="http://msdn.microsoft.com/en-us/library/system.data.objects.sqlclient.sqlfunctions.stringconvert.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.data.objects.sqlclient.sqlfunctions.stringconvert.aspx
推荐答案
由于它直接关系到这里找到STR功能:
Because it's directly related to the STR function found here:
http://msdn.microsoft.com/en-us/library/ ms189527.aspx
和该功能只需要一个浮动,因此,您所看到的参数。
and that function only takes a float, hence the parameters you're seeing.
这篇关于为什么没有INT过载SqlFunctions.StringConvert的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!