using System;
public class Program
{
public static void Main()
double val = 20.0;
//string arg = "123.45"; // will return true
string arg = "123.45s"; // will return false
bool ret = double.TryParse(arg, out val);
if (ret == true)
Console.WriteLine("val = {0}", val);
}
else
Console.WriteLine(ret);