How do I get the user's number into the double?
Error: Cannot convert type 'string' to 'double'Code:string temp; double myDBL; Console.Write("Enter a number: "); temp = Console.ReadLine(); //something like "231.44324" //perform some tests on the string to make sure its ok //... myDBL= temp; //causes compiler cast error




Reply With Quote