What is the StringBuilder class?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

What is the StringBuilder class?

Rating:

The StringBuilder class that derives from the System.Text namespace, represents dynamic or mutable strings of characters. The class represents a string-like object whose value is changeable. Its value can be modified once the string of characters has been inserted, replaced, or appended. The capacity of any StringBuilder object is the maximum number of string characters that the object can store at a given time. The capacity can be increased or decreased with the Capacity property or EnsureCapacity method of the StringBuilder class, but it cannot be less than the length of the string representation of the value of its object.

The StringBuilder object creates a buffer when a new string of data is inserted, appended, or replaced. The new data is appended to the end of the buffer if enough space is available. If the original buffer cannot accommodate any large data, a new buffer is allocated that is much larger than the original one. When the new buffer is created, the old data is first copied to it from the original buffer and the new data is appended to its end. The performance of the StringBuilder object depends upon how frequently a memory is allocated. Memory is allocated only when the buffer becomes too small for the accommodation of new data.


Rating:



Other articles

Click here to Article home

Microsoft Certification MCSE: MCSA , MCTS, MCDST, MCAD, MCDBA, MCSE Messaging, MCSE Security
JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.
 
HACKER SAFE certified sites prevent over 99.9% of hacker crime.