Reputation: 286
i need to replace this "―" character in my c# string i used replace function in multiple ways it did't work. string and code example is below:
string str="The Organisation of abc Cooperation ―OIC";
lbl.Text = str.Replace("—", "").Replace("—", "");
Upvotes: 0
Views: 103
Reputation: 100555
This is the case where copy-paste works - if you copy the character to string you are searching for it will work.
You also can use correct representation of Unicode charaters like:
lbl.Text = str.Replace("\u2015", "");
Upvotes: 6