the question is really simple. How do we format strings in C#? this way:
string.Format(\"string goes here with placeholders like {0} {1}\", firstName, lastN
Yes it is possible:
public static class Extensions { public static string Format(this string str, params object[] args) { return String.Format(str, args); } }
and should using as below:
Console.WriteLine("format string {0} {1}".Format((object)"foo", "bar"));