Skip to content

Tag Archives: CSharp-StringBuilder-Class

StringBuilder() constructor is used to initialize a new instance of the StringBuilder class which will be empty and will have the default initial capacity. StringBuilder… Read More
StringBuilder(Int32) constructor is used to initialize a new instance of the StringBuilder class which will be empty and will have the specified initial capacity. StringBuilder… Read More
C# StringBuilder is similar to Java StringBuilder. A String object is immutable, i.e. a String cannot be changed once created. Every time when you use… Read More
This method is used to converts the value of this instance to a String. A new String object is created and initialized to get the… Read More
StringBuilder.Capacity Property is used to get or set the maximum number of characters that can be contained in the memory allocated by the current instance. … Read More
StringBuilder.Clear Method is used to remove all the characters from the current StringBuilder instance. Syntax: public System.Text.StringBuilder Clear (); It returns an StringBuilder object whose… Read More
This method is used to copy the characters from a specified segment of this instance to a specified segment of a destination Char array. Syntax:… Read More
The EnsureCapacity(Int32) method of StringBuilder class helps us to ensures the capacity is at least equal to the specified value that is passed as the… Read More
StringBuilder.Equals Method is used to check whether this instance is equal to a specified object. Syntax: public bool Equals (System.Text.StringBuilder sb); Here, sb is an… Read More
StringBuilder.MaxCapacity Property is used to get the maximum capacity of this instance. Syntax: public int MaxCapacity { get; } Property Value: It returns the maximum… Read More
StringBuilder.Length Property is used to get or set the length of the current StringBuilder object. Syntax: public int Length { get; set; } It returns… Read More
StringBuilder.Chars[Int32] Property is used to get or set the character at the specified character position in this instance. Syntax: public char this[int index] { get;… Read More

Start Your Coding Journey Now!