how to setup a method getting args to be applied using String.Format(....)?
Example:
private void log(object text, params object[] param)
{
string line;
if (param != null && param.Length > 0)
line = String.Format(text.ToString(), param);
else
line = text.ToString();
if (Environment.UserInteractive==true)
Console.WriteLine(line);
}
Keine Kommentare:
Kommentar veröffentlichen