Wednesday, September 3, 2008

Current Lesson: StringBuilder

StringBuilder
by: Salman Ahmed

String Builder - So you want to learn about the StringBuilder eh?

In Classic ASP we were accustomed to forming sql strings or any other string by concatenating values using '&' that would sometimes span many lines. A fast and efficient way of performing this same task in C# is so much cleaner and a pleasure to work with.

You will find this class in System.Text (namespace). StringBuilder is ideal for appending, removing, replacing, or inserting characters. This size of your string can be modified dynamically, no need to set a size during declaration.

Common usage of StringBuilder would be concatenating string values, replacing values in a string e.g Replacing all occurances of ' with ''

More...
http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=13

ASP.Net Feeds