HI WELCOME TO KANSIRIS

Difference between String and Stringbuilder in C#, Asp.net

Leave a Comment
String
StringBuilder
It’s an immutable
It’s mutable
Performance wise string is slow because every time it will create new instance
Performance wise stringbuilder is high because it will use same instance of object to perform any action
In string we don’t have append keyword
In StringBuilder we can use append keyword
String belongs to System namespace
Stringbuilder belongs to System.Text namespace

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.