What are the members of stringbuilder class in C#?


StringBuilder class is a highly recommended class to concatenate strings. It has many properties and methods as its members.



Most frequently used members of StringBuilder class are listed below:

Length – Property that determines length of a StringBuilder instance.
Capacity – Property that determines maximum characters that the StringBuilder instance can hold.
Append – Method to append a string to a StringBuilder instance. The string will be added at the end of this instance. This method has overloaded versions.
Equals – Method used to check if the current StringBuilder instance is equivalent to a specific object. This method has overloaded versions.
GetType – Method used to return type of the instance.
Insert – Method used to insert a string into a StringBuilder instance at a specific position. This method has overloaded versions.
Remove – Method used to remove specific set of characters from the StringBuilder instance.
Replace – Method used to replace a specific string or character with a new. This method has overloaded versions.
ToString – Method used to convert the StringBuilder instance into a String. This method has overloaded versions. Note that this is also an overridden method where in the base method belongs to System.Object.
MemberwiseClone – Method used to clone the entire StringBuilder instance. This is an overridden method and it is accessible only to the subclasses inheriting from StringBuilder class.

| Can you call a constructor from another constructor of the Class in .NET? | Difference between Response.Output.Write() method and Response.Write() method in .NET | How do you establish multiple inheritance in C#? | How do you introduce a ReadOnly property in C#? | How do you perform constructor overloading in C#? | Is catch(Exception) recommended to be used in .NET? | What are the different access modifiers available in C#? | What are the different ways of overloading in C#? | What are the members of stringbuilder class in C#? | What is Multicast Delegate? Explain it with example in C# | What is the difference between abstract class and interface in .NET? | What is the difference between Clone and CopyTo methods in .NET | What is the difference between const and readonly in .NET | What is the difference between directcast and ctype in .NET? | What is the difference between out and ref parameters in .NET | What is the difference between public assembly and private assembly in .NET | What is the difference between strong typing and weak typing in .NET? | What is the difference between Trace and Debug in .NET | What is the need for Abstract Factory Pattern in C#? | What is the need for Adapter Pattern in C# |


“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”

| Privacy Policy for www.dotnet-guide.com | Disclosure | Contact |

Copyright - © 2004 - 2024 - All Rights Reserved.