Add two format methods to TextWriter

Two simple extensions methods to make formatting with the TextWriter class more easier and IMHO easier to read.

static class extensionMethods
{  
   public static void Format(this System.IO.TextWriter writer, string format, 
   params object[] args)
   {
      writer.Write(String.Format(formatInfo, format, args));
   }

   public static void FormatLine(this System.IO.TextWriter writer, string format,
   params object[] args)
   {
      writer.WriteLine(String.Format(formatInfo, format, args));
   }
};

Lastest update in December 2019, inital post in December 2019

Write a comment

I appreciate comments, suggestions, compliments etc. Unfortunately I have no time to reply to them. Useful input will be used for sure!