This is ok:
Console.WriteLine("this is the key that has run: {0}", this.ReportKey.ToString());
Is this way of putting together strings only available when building arguments for the console or can it be used in other contexts. Can it be used in the following? I’ve put my failed attempt.
public string RunTheReport(){
return "Name: " + this.ReportName " key: " + this.ReportKey.ToString();
//return ("Name: {0} key: {1}", this.ReportName, this.ReportKey.ToString()); <<is there a way to avoid using all the "+" signs?
}
Use
string.Format: