Blog Home  Home Feed your aggregator (RSS 2.0)  
Software Code Help blogs - What's the difference between String and String Builder?.
newtelligence powered
 
 Friday, August 01, 2008

A string is a sequential collection of Unicode characters that is used to represent text. At the other hand the string builder is sealed class(Cannot be inherited)it represents a mutable string of characters.

 

String is mutable that means that it can't be modified once created, to modify a given string by appending new characters or so the CLR destroy the first string instance and create a new string one and this costs in terms of memory and time process.

 

 Using the string builder, you create a mutable object that recieves modification without having to be destroyed and reinstanciated for each modifiaction

Friday, August 01, 2008 6:10:47 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Interview Question .NET  | 
Copyright © 2009 Software Code Help. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: