title: (cannot convert type void to string)
body: <p>I tried very hard, googled a lot but still I'm getting the same error.. Don't know what to change or how to change.<br>
  The error happens at <code>string std = Console.Write(p);</code><br>
  I did assigned <code>p</code> to <code>hi</code> then why it returns to void..?</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.IO;
  namespace SoloLearn
  {
      class Program
      {
          static void Main(string[] args)
          {
              string p = "hi";
              string str = " if (p == ";
              string std = Console.Write(p);
              File.WriteAllText("test.txt", str + std);
              string txt = File.ReadAllText("test.txt");
              Console.WriteLine(txt); 
          }
      }
  }
  </code></pre>
  
  <p>I was expecting an out put like a text file with <code>if (p == hi</code> in it..</p>