Skip to main content

Home/ calendar.html by karan chanana/ Contents contributed and discussions participated by karan Chanana

Contents contributed and discussions participated by karan Chanana

karan chanana - 1 views

started by karan Chanana on 05 Nov 12 no follow-up yet
1More

How to: Join Multiple Strings (C# Programming Guide) - 0 views

started by karan Chanana on 29 Oct 12 no follow-up yet
  • karan Chanana
     
    How to: Join Multiple Strings (C# Programming Guide)


    string two = "karan";
    string str = "chanana " + karan + "k";
    System.Console.WriteLine(str);

    The following code uses the Append method of the StringBuilder class to join three strings without the chaining effect of the + operator.

    class StringBuilderTest
    {
    static void Main()
    {
    string karan = "karan";

    System.Text.StringBuilder sb = new System.Text.StringBuilder();
    sb.Append("chanana ");
    sb.Append(karan);
    sb.Append(" k");
    System.Console.WriteLine(sb.ToString());

    string str = sb.ToString();
    System.Console.WriteLine(str);
    }
    }



    Tag , karan chanana , c , c++ , karan
1 - 2 of 2
Showing 20 items per page