Why do we use stringbuilder in c#?



Why do we use stringbuilder in c#?..

Answer / Nitin Dwivedi

We use StringBuilder in C# for efficient handling of dynamic strings. It is useful when you need to frequently concatenate or manipulate strings, as it avoids unnecessary memory allocations associated with the creation of new strings. This leads to better performance, especially when dealing with large amounts of text.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Can we declare class as protected?

1 Answers   Infosys,


Where do you add an event handler ?

1 Answers  


Wcf and what is difference between wcf and web services?

1 Answers  


What is a c# delegate?

1 Answers  


What are the types of methods in c#?

1 Answers  


What is inheritance in csharp?

1 Answers  


what is collections in .net? why we use?

1 Answers  


What are anonymous functions in c#?

1 Answers  


7.What are typed data set?

2 Answers   Ebix, Mphasis,


What is as keyword in c#?

1 Answers  


Which is better javascript or c#?

1 Answers  


Why do we need static in c#?

1 Answers  


Categories