Replace character at specific index

How do I change 19.800.00 to 19,800.00 ?

Hey

If its standar you can try this

YourStringVar.Remove(2,1).Insert(2,",")

Regards!

1 Like

@arina the below code would help

string val = "19.800.00"
int pos = val.IndexOf(".")
string res = val.Remove(pos, 1).Insert(pos, ",")
1 Like

Hi Anand,

Just wanted to know what does that 1 refers in (Pos, 1)?

1 Like

Hey

it means the start position of the element to remove, and how many you want to remove
image
as you see in this example, if you want to get it in better details check this post

Regards!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.