问题
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?
http://msdn.microsoft.com/en-us/library/system.data.objects.sqlclient.sqlfunctions.stringconvert.aspx
回答1:
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.
来源:https://stackoverflow.com/questions/8806315/why-is-there-no-int-overload-for-sqlfunctions-stringconvert