What’s the difference between System.String and
System.Text.StringBuilder classes with example
Answer Posted / puneet mishra
according to me difference between a string class and using String Builder is that in using a string class you need to create new object befour appending it to the main string but in string builder class one don`t need to create object every time
Example for string builder class:
using System.Text;
stringBuilder str = new stringBuilder;
str.append("");
in the previous example once u create str as new instance of string builder class u just have to append every thing in to the string
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What is string in c# net?
What is difference between ienumerable and ienumerator in c#?
List down the fundamental oop concepts?
How do destructors and garbage collection work in c#?
Define assert() method? How does it work?
Tell me the difference between value passing and address passing?
Describe an interface class?
what will be the output of the given below coding. using System; public class Exercise { static void OddNumbers(int a) { if (a >= 1) { Console.Write("{0}, ", a); a -= 2; OddNumbers(a); } } public static int Main() { const int Number = 9; Console.WriteLine("Odd Numbers"); OddNumbers(Number); Console.WriteLine(); return 0; } }
What is the use of parse in c#?
What is strong data type in c#?
Is c# static or dynamic?
Can a class have more than 1 destructor?
When was c# created?
How many types of methods are there in c#?
Why do we use classes?