top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Difference between system.string and system.Text.stringbuilder classes in c#.net?

0 votes
511 views
Difference between system.string and system.Text.stringbuilder classes in c#.net?
posted Aug 5, 2014 by Sanjay

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Strings are immutable in C#.

For suppose you have declared a string as follows
string name = "Naveen" in case if you want to append any text to string name a new copy of string is created whereas if you use stringbuilder no new copy gets created if you want to append any string even after intialization of it.We can use concat method of it and append.

answer Aug 7, 2014 by Naveen Kumar Mukka
Similar Questions
+3 votes

By-default all the methods & variables in class are private.

In C#.net Main() method is private then how compiler access this Main() Method out side the class because compiler is not part of our program then how compiler access this Main() method?

Here we loose our data abstraction property ? Can anyone put some light on it?

...