title: How To Split a Single TextWriter into Multiple Outputs in .NET?
body: <p>I call an API from my C# code that has a method with the following header </p>
  
  <pre><code>public void ExternalFactory.SetOut(TextWriter outputStream)  
  </code></pre>
  
  <p>I typically call this method like </p>
  
  <pre><code>ExternalFactory.SetOut(Console.Out) 
  </code></pre>
  
  <p>to just have the API write all of its information to the Console.  However, I would also like to store this information in a more permanent place such as a text file in addition to being written to the Console.</p>
  
  <p>My first guess is that I need to create some sort of customer TextWriter that splits the stream and sends one to the Console and one to a StreamWriter.  What is the correct approach here? </p>