Thursday, July 21, 2011

StringBuilder Object where you can point specific character but not in System.String

From sample code, you will see nice thing that can be useful in programming
--------------------------------------------------------------------------
System.Text.StringBuilder sb = new System.Text.StringBuilder("Rat: the ideal pet");
sb.Append(" is caught");
sb[0] = 'C';
System.Console.WriteLine(sb.ToString());
System.Console.ReadLine();
-----------------------------------
Output : Cat: the ideal pet is caught

No comments:

Post a Comment