Skip to main content
added 99 characters in body
Source Link
ehh
  • 3.5k
  • 9
  • 51
  • 98

string interpolation is a good solution however it requires C#6. In

In such case I am using StringBuilderStringBuilder

var sb = new StringBuilder(); sb.AppendFormat("Her name is {0} ", "Lisa"); sb.AppendFormat("and she's {0} years old", "10"); // You can add more lines string result = sb.ToString(); 

string interpolation is a good solution however it requires C#6. In such case I am using StringBuilder

var sb = new StringBuilder(); sb.AppendFormat("Her name is {0} ", "Lisa"); sb.AppendFormat("and she's {0} years old", "10"); // You can add more lines string result = sb.ToString(); 

string interpolation is a good solution however it requires C#6.

In such case I am using StringBuilder

var sb = new StringBuilder(); sb.AppendFormat("Her name is {0} ", "Lisa"); sb.AppendFormat("and she's {0} years old", "10"); // You can add more lines string result = sb.ToString(); 
Source Link
ehh
  • 3.5k
  • 9
  • 51
  • 98

string interpolation is a good solution however it requires C#6. In such case I am using StringBuilder

var sb = new StringBuilder(); sb.AppendFormat("Her name is {0} ", "Lisa"); sb.AppendFormat("and she's {0} years old", "10"); // You can add more lines string result = sb.ToString();