---
title: "What’s the difference between System.Text.StringBuilder and System.String?"  
description: "What’s the difference between System.Text.StringBuilder and System.String?"  
author: "Uttam Misra"  
published: 2010-10-15  
updated: 2020-09-16  
canonical: https://www.mindstick.com/interview/1/what-s-the-difference-between-system-text-stringbuilder-and-system-string  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# What’s the difference between System.Text.StringBuilder and System.String?

StringBuilderis more efficient in the cases, where a lot of manipulation is done to thetext. Strings are immutable, so each time it’s being operated on, a newinstance is created.

## Answers

### Answer by Amit Singh

## Difference between StringBuilder and string

String and StringBuilder class stores strings. But when you cannot change a String object after creating one.

eg: String name = "amit";

By saying you cannot change the name object means you cannot change the value in name object internally. When you

change the name object value to something else, a new String object is creating in memory and assign the new value.

Example: name = "Amit Singh";

If you are doing string concatenation StringBuilder class is far better in performance than String class.

You can use StringBuilder's Append() method to use concatenation.**\** \

### Answer by Uttam Misra

StringBuilderis more efficient in the cases, where a lot of manipulation is done to thetext. Strings are immutable, so each time it’s being operated on, a newinstance is created.


---

Original Source: https://www.mindstick.com/interview/1/what-s-the-difference-between-system-text-stringbuilder-and-system-string

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
