Alberto <al*****@nospam.com> wrote:
why there isn't a Convert.ToFloat() method in the Convert class?
Sometimes I can't work with a float field because there isn't this method
and I need it to, for example, convert the input in a textBox to a float
field.
Because Float isn't the name of the type in question - Single is.
There's a Convert.ToSingle() method, just like there's
Convert.ToInt32() instead of Convert.ToInt().
The shorthand of "float" for System.Single is a C# notion, rather than
a .NET one.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too