I am beginner in C#. I'm trying to convert a `string` to `double`. Here is the code with the method `double.Parse()`:

```
static void Main(string[] args)
{
    string s="0.5";
    double b = double.Parse(s);
    Console.WriteLine("double.Parse() - {0}",b);
}

```

I tried with `System.Convert.ToDouble()` too:

```
static void Main(string[] args)
{
    string s="0.5";
    double b = System.Convert.ToDouble(s);
    Console.WriteLine("Convert.ToDouble() - {0}",b);
}

```

In both ways the Program throws Exception: 

> 
> "Input string was not in a correct format".
> 
> 
> 

Please help!!!. Thanks in advance.