I have a string where the third last character is sometimes a ,
If this is the case I want to replace it with a .
The string could also have other
A more proper method would probably be to use the cultures
string input = "12345,67";
System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("nl-NL");
decimal value = System.Convert.ToDecimal(input);
System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
string converted = string.Format("{0:C}", value);