StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it’s being operated on, a new instance is created. In string builder only one instance is created.
What are the 4 important principles in OOP, below Video answers about the same.
Please click here to see more interview questions and answers for c#
write a comment