- String vs StringBuilder
String
- Immutable
- Every time a change happens in string, a new object is getting created in memory
- In situation, you need to make repeated modification to string, its an overhead.
System.Text.StringBuilder
- Mutable
- Advantage: Performance boost while doing string concatanation(use Append method)
No comments:
Post a Comment