Senior programmer analyst interview questions shared by candidates
What is the difference between String and StringBuilder classes in .NET?
string is immutable. Use Stringbuilder to build strings from smaller strings. If you use string for that like string s = "this" + " assigns" + " lots" + "of" + " little" + " strings"; then for each intermediate sum, a new string is allocated, and the smaller strings used before have to be garbage collected.
See Interview Questions for Similar Jobs
- Social Worker
- Registered Nurse
- Mechanical Engineer
- Sales Associate
- Dental Assistant
- Graphic Designer
- Pharmacy Technician
- Pharmaceutical Sales