I often use String.Format()
because it makes the building of strings more readable and manageable.
Is there anyway to reduce its syntactical verbosity, e.g. with an extension method, etc.?
Logger.LogEntry(String.Format("text '{0}' registered", pair.IdCode));
public static void LogEntry(string message)
{
...
}
e.g. I would like to use all my and other methods that receive a string the way I use Console.Write()
, e.g.:
Logger.LogEntry("text '{0}' registered", pair.IdCode);