S
Sin Jeong-hun
If I use something like this,
string html = "<h1>C# is great</h1>";
Console.WriteLine(html.Replace("<","<").Replace(">",">"));
Does this recreate new string objects two times, even though it has
nothing to replace, and it is OK to return the same string object?
I know, regular expression is a more delicate way to do this, but it
always is kind of too complicated to me.
Thank you.
string html = "<h1>C# is great</h1>";
Console.WriteLine(html.Replace("<","<").Replace(">",">"));
Does this recreate new string objects two times, even though it has
nothing to replace, and it is OK to return the same string object?
I know, regular expression is a more delicate way to do this, but it
always is kind of too complicated to me.
Thank you.