What is the Main difference between String and
StringBuilder and why do we use StringBuilder.
Answer Posted / ashwini choudhari
string class u can't directly the change the string value
and u want to do some manipulation with the string object
then it's give the new memory in stack when u can the do
the manipulation with the string object but in String
Builder class not happened to give the new memory
allocation in stack it just repalcing the some part of
string which u want repalce or appended so that the
performances increases.
Actually String Builder it is referneces type .
| Is This Answer Correct ? | 11 Yes | 8 No |
Post New Answer View All Answers
Can abstract class have constructor?
What is xaml in c#?
What’s thread.sleep() in threading ?
What does the dispose method do with the connection object?
Suppose two interfaces have same method, so how will you implement these methods in derive class?
Why do we need encapsulation in c#?
Which is better python or c#?
What is yield c#?
How the versioning applies to Assemblies or can you explain version numbers?
Which string method is used for concatenation of two strings in c#?
What are Indexers in C#?
What is a collection class in c#?
What are generics in c#.net?
What are collections in c#?
What is Delegate and what is it used for ?