title: Redirect console.writeline from windows application to a string
body: <p>I have an external dll written in C# and I studied from the assemblies documentation that it writes its debug messages to the Console using <code>Console.WriteLine</code>.</p>
  
  <p>this DLL writes to console during my interaction with the UI of the Application, so i don't make DLL calls directly, but i would capture all console output , so i think i got to intialize in form load , then get that captured text later.</p>
  
  <p>I would like to redirect all the output to a string variable.</p>
  
  <p>I tried <code>Console.SetOut</code>, but its use to redirect to string is not easy.</p>