Question:
what is the difference between string and stringbuilder?
Answer:
system.string is immutable,system.string builder was designed with the purpose of having a mutable string where a variety of operations can be performed. Source: CoolInterview.com
Answered by: vindhyarani | Date: 10/15/2007
| Contact vindhyarani
system.string is immutable,system.string builder was designed with the purpose of having a mutable string where a variety of operations can be performed. Source: CoolInterview.com
Answered by: satyen basu | Date: 11/28/2007
| Contact satyen basu
String is mutable means if we want to add something at the end of string then first it will remove that string then it will write desired string. String builder is immutable means while adding one more char at the end of string it directly upend the string without remove original string. Source: CoolInterview.com
Answered by: Meena Kadam | Date: 12/7/2007
| Contact Meena Kadam
System.String is immutable; System.StringBuilder can have mutable string where a variety of operations can be performed. Source: CoolInterview.com
Answered by: json | Date: 12/10/2008
| Contact json
String is mutable means if we want to add something at the end of string then first it will remove that string then it will write desired string. String builder is immutable means while adding one more char at the end of string it directly upend the string without remove original string. Source: CoolInterview.com
Answered by: BALAMURUGAN SOUPRAYEN | Date: 1/20/2009
| Contact BALAMURUGAN SOUPRAYEN
System.string provides a set of members for working with text.Like search,replace,concratinate etc.. and strings of type system.string are immutable(that means any change to string causes a runtime to create a new string and abandon old one). System.stringbuilder is used to dynamic strings which are mutable also.these string classes also overrides operators from System.object. Source: CoolInterview.com
Answered by: bharat | Date: 3/30/2009
| Contact bharat
String is immutable, string builder is mutable where we can mutate the content without creating a new memory. Source: CoolInterview.com
Answered by: dotGuru | Date: 5/8/2009
| Contact dotGuru
Answers:
system.string is immutable,system.string builder was designed with the purpose of having a mutable string where a variety of operations can be performed. Source: CoolInterview.com
Answered by: Harmeet Singh Virk | Date: 8/28/2009
| Contact Harmeet Singh Virk
String class is immutable.Because the state of the object can not be changed by any other operation.StringBuilder class is mutable.Here,The state can be changed by its operations. Source: CoolInterview.com
Answered by: SoumyaLaxmi | Date: 2/23/2010
| Contact SoumyaLaxmi
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|