I often use String.Format()it because it makes line building more readable and manageable.
Is there a way to reduce its syntactic verbosity, for example. with extension, etc.?
Logger.LogEntry(String.Format("text '{0}' registered", pair.IdCode));
public static void LogEntry(string message)
{
...
}
eg. I would like to use all my and other methods that get the string the way I use Console.Write(), for example:
Logger.LogEntry("text '{0}' registered", pair.IdCode);
source
share