TK. TK. - 1 month ago 15
C# Question

C# string manipulation search and replace

I have a string which contain tags in the form

< tag >
. Is there an easy way for me to programmatically replace instances of these tags with special ascii characters? e.g. replace a tag like
"< tab >"
with the ascii equivelent of
'/t'
?

Answer
string s = "...<tab>...";
s = s.Replace("<tab>", "\t");
Comments