2
Reply

What is the difference between System.Text.StringBuilder over System.String?

Arun Singh

Arun Singh

Jul 04, 2012
1.2k
0

    system.string ============= 1-Present in system namespace 2-Here concatenation is used to combine two strings. 3-The first string is combined to the other string by creating a new copy in the memory as a string object, and then the old string is deleted 4-we say "Strings are immutable".(cant be change the memory of object its changed by garbagecollector when it runs)(slower performance) =============== system.stringbuilder ================= 1-Present in system. Text namespace 2-Here Append method is used. 3-Insertion is done on the existing string. 4-Its mutable(better performance than string)

    Bhabani Prasad
    May 23, 2014
    0

    system.string ============= 1-Present in system namespace 2-Here concatenation is used to combine two strings. 3-The first string is combined to the other string by creating a new copy in the memory as a string object, and then the old string is deleted 4-we say "Strings are immutable".(cant be change the memory of object its changed by garbagecollector when it runs)(slower performance) =============== system.stringbuilder ================= 1-Present in system. Text namespace 2-Here Append method is used. 3-Insertion is done on the existing string. 4-Its mutable(better performance than string)

    Bhabani Prasad
    May 23, 2014
    0