Oct 18, 2019 in C Sharp
Q: Explain String Builder class in C#?

1 Answer

0 votes
Oct 18, 2019
This will represent the mutable string of characters and this class cannot be inherited. It allows us to Insert, Remove, Append and Replace the characters. “ToString()” method can be used for the final string obtained from StringBuilder. For example,

StringBuilder TestBuilder = new StringBuilder("Hello");

TestBuilder.Remove(2, 3); // result - "He"

TestBuilder.Insert(2, "lp"); // result - "Help"

TestBuilder.Replace('l', 'a'); // result - "Heap"
Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

+1 vote
Jan 20, 2020 in C Sharp
...