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 ,'s throughout. Is there an elegant solution to this?
EDIT: Thanks everyone for your answers. Just to clarify, yes by third last I mean a string of the form xxxxxx,xx (it's a european currency thing)
string.Format("{0:0.00}", 275.95, System.Globalization.CultureInfo.CreateSpecificCulture("nl-BE"));with the correct culture? This example would return 275,95