C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




String and string builder


Posted Date: 10 Jun 2007      Total Responses: 5

Posted By: DotNetGal [ss.mmm]       Member Level: Silver     Points: 2


What is the difference between string and string builder?

Thanks




Responses

Author: vimalraj    10 Jun 2007Member Level: SilverRating:     Points: 2
with string you c't do more string operations
but with stringBuilder you can do more string operations


Author: vimalraj    10 Jun 2007Member Level: SilverRating:     Points: 2
with string you c't do more string operations
but with stringBuilder you can do more string operations


Author: vimalraj    10 Jun 2007Member Level: SilverRating:     Points: 2
with string you c't do more string operations
but with stringBuilder you can do more string operations


Author: victoria    11 Jun 2007Member Level: GoldRating:     Points: 2
Hello ss.mmm

using string you cannot make changes to original string ,whenever u do any operation on the string it will create a new copy of the string with the operation done..

like if you are performing upper case operation on string s then it actually creates a new copy of s which is uppercase..


but where as stringBuilder performs operation on the original string directly hence saves much space ..
StringBuilder assigns more number of locations for a string then actually required locations so as and when you perform operations on this object the system will resize the objects..

simple answer for your question is
string generates immutable object and stringBuilder generates mutable(changable) objects.


Author: Anand    11 Jun 2007Member Level: BronzeRating:     Points: 2

1. stringbuilder is mutable and that is why one can use it when large number of string manipulation is


2. needed. where as string is immutable so each time the string is changed a new


3. instance has been created in the memory.



see that link :
http://www.heikniemi.net/hc/archives/000124.html


Post Reply
You must Sign In to post a response.
Next : doubt in asp.net
Previous : factory provider in dal
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

fax server

Contact Us    Privacy Policy    Terms Of Use