C# - float to string conversion - decimal separator problem
<p>I'm having a problem with the following code:</p>

<pre><code>string latString = "50.09445";
float lat = Convert.ToSingle(latString);
</code></pre>

<p>The second command throws a FormatException exception. I know that problem is that culture settings I'm using (cs-CZ) use comma as decimal separator and this string contains decimal point instead.</p>

<p>Is there some easy way to "ignore" the culture settings and always use decimal point for the conversion? Or should I just avoid the problem by checking the string first and replace comma by the decimal point?</p>
