I\'m reading numbers from XML files. Other numbers are with a comma separator (0,1111) and others with dot (0.1111). How do I parse these numbers so I get the desired result
Is there anything in the XML files that will tell you which format is being used? There's not a built-in way in .NET to have two different allowed decimal separators. If there's nothing telling you which format a number is going to be in, then you could always check to see whether the string contains a period or a comma, and create a NumberFormatInfo with that as the decimal separator. Of course, this won't work if any of the numbers have a period or comma as a thousands separator.