c# - Replace dot(.) with comma(,) using RegEx? -
I am working on a C # application. I want to change the decimal decimal shape with a comma (,), where I have a dot (.) Using regular expressions.
For example:
value = 100,00.56
This is the international rule to represent numerical values but I There are different ways for numbers such as
value = 100.00,56
So I want to do dot (.) With comma (,) and comma ( ,) Should use RegEx in dot (.) May guide me in this.
When the formatting number, the culture name for Swedish is "SV-SE", as seen Could.
decimal value = -16325.62m; Console.WriteLine (value.ToString (CultureInfo.CreateSpecificCulture ("sv SE")); Edit : As @Oreganhost tells you - having the number of parsing numbers done with CultureInfo
needed.
Comments
Post a Comment