System.Convert.ToDouble(stringVal)
-
What differences between: double num= System.Convert.ToDouble(stringVal); double num= Convert.ToDouble(stringVal); Thanks!
No difference actually. System is almost always automatically added in "using" section.
-
What differences between: double num= System.Convert.ToDouble(stringVal); double num= Convert.ToDouble(stringVal); Thanks!
-
What differences between: double num= System.Convert.ToDouble(stringVal); double num= Convert.ToDouble(stringVal); Thanks!
The first example guarantees that the .Net version of
Convert.ToDouble
will be used. The second one will use the locally defined version if you've written one, and if not, will use the one defined in theSystem
namespace. Most programmers don't bother qualifying theConvert
object, and just use the 2nd example."Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001