in C Sharp by
Q:
Explain String Builder class in C#?

1 Answer

0 votes
by
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
asked Jan 20, 2020 in C Sharp by AdilsonLima
0 votes
asked Feb 16, 2020 in C Sharp by rahuljain1
+1 vote
+1 vote
+1 vote
0 votes
asked May 24, 2019 in JAVA by rajeshsharma
+1 vote
0 votes
0 votes
asked Oct 18, 2019 in C Sharp by Robin
0 votes
asked Oct 18, 2019 in C Sharp by Robin
...