posted 6/8/2010 by Samir NIGAM
Before .NET 4.0, if you want to clean an existing instance of StringBuilder class, then you had to set its length equal to ZERO as there was no method to do the same. e.g.
StringBuilder sb= new StringBuilder(); sb.Append("hi"); sb.AppendLine("this is samir"); sb.Length = 0;
Now in .NET 4.0, there is a method Clear to clean an instance of StringBuilder class.
sb.Clear();
This is a nice enhancement.
What kind of email newsletter would you prefer to receive from CodeAsp.Net?18