DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Concat String Using A String.format()

03.26.2012
| 1546 views |
  • submit to reddit
        Concat string using a string.format()

        // string 1
	string string1 = "This is string1";

        // string 2
	string string2 = "This is string2";

        // Concat string using string.fromat()
	Console.WriteLine(string.format("{0} {1}",string1,string2);