You can use the TryParse methods
so your code should look like:
public static void Main(string[] args)
{
string s1="sidd";
string s2="siddh";
double da= = 0;
double d=0;
if (Double.TryParse(s1, out da))
Console.WriteLine("converte string is={0}",da);
if (Double.TryParse(s2, out d)
Console.WriteLine("converte string is={0}", d);
}
This mans that if the conversion fails da and d have value 0 otherwise the converted value