I agree with leppie’s reply; to put that in terms of code:
string s = "123,456.789";
float f = float.Parse(s, CultureInfo.InvariantCulture);
More Related Contents:
- Parse DateTime with time zone of form PST/CEST/UTC/etc
- JavaScriptSerializer.Deserialize – how to change field names
- Coercing floating-point to be deterministic in .NET?
- Read and parse a Json File in C#
- Formatting a float to 2 decimal places
- Formatting doubles for output in C#
- Why can’t DateTime.Parse parse UTC date
- How to parse very huge XML Files in C#? [duplicate]
- C#: Convert Byte array into a float
- Why does TimeSpan.ParseExact not work
- Using ANTLR 3.3?
- How to write a Parser in C#? [closed]
- Double.TryParse or Convert.ToDouble – which is faster and safer?
- Float/double precision in debug/release modes
- Casting vs Converting an object toString, when object really is a string
- How to create a new language for use in Visual Studio
- Read a XML (from a string) and get some fields – Problems reading XML
- Lex/Yacc for C#?
- Improving/Fixing a Regex for C style block comments
- How to fix ill-formed HTML with HTML Agility Pack?
- What is the C# equivalent of NaN or IsNumeric?
- reading two integers in one line using C#
- Httplistener and file upload
- Elegant way parsing URL
- How to get all input elements in a form with HtmlAgilityPack without getting a null reference error
- Where is a good Address Parser [closed]
- Are there .NET Framework methods to parse an email (MIME)?
- What’s the best way to represent System.Decimal in Protocol Buffers?
- regex match keywords that are not in quotes
- How to get floats value without including exponential notation