title: c# convert console.writeline to a string
body: <p>I want a code that takes the text that was written on the console and put it on a string variable, plz.
  Something like this:</p>
  
  <pre><code>string s = Console.WriteLine(Invoke(o, null));
  </code></pre>
  
  <p>I want it with console because if I invoke it without it I can't get the text from it.</p>
  
  <p>I hope you understand it.</p>