Why is there no Convert.toFloat() method?

There is – but it’s called Convert.ToSingle(). float is a C# alias for the System.Single type.

“Single” is the name for a float in the BCL. “float” is an alias provided by C#. There’s a Convert.ToSingle() method, just like there’s
Convert.ToInt32() instead of Convert.ToInt().

See this thread Convert class

(BTW – I didn’t know this either, so I learned something new today 🙂 )

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)