title: Why I am not able to use await keyword before async method?
body: <p>I have written the below code-snippet in <code>Main</code> method. I'm not able to use await keyword before <code>WriteAsync()</code>.</p>
  <p><strong>snippet-1:</strong></p>
  <pre><code>while (fileLength &lt; 100)
              {
                  i = i + 1;
                  sampleText = String.Format(&quot;Line {0} of {1} \n&quot;, i, lineCount);
                  data = encoding.GetBytes(sampleText);
                  fileStream.WriteAsync(data, 0, data.Length);
                  fileLength = fileLength + data.Length;
                  Console.WriteLine(&quot;Length of file written: &quot; + fileLength);
              }
   fileStream.Close();
  </code></pre>
  <p><strong>snippet-2:</strong></p>
  <pre><code>while (fileStream1.Position == fileLength)
              {
                   fileStream1.ReadAsync(data, 0, 100);
              }
  </code></pre>
  <p>The connection is closed in snippet-1 after the execution of while loop and snippet-2 is working fine.</p>
  <p><strong>while executing it I have got the following queries:</strong></p>
  <ol>
  <li>Is it mandatory to  use await operator before <code>WriteAsync(Byte[], Int32, Int32)</code>?</li>
  <li>Can we use <code>ReadAsync(Byte[], Int32, Int32)</code> without any await operator?</li>
  <li>Can we use <code>Thread.Sleep</code> in place of await operator?</li>
  </ol>
  <p>I have little experience in C# and multi-threading. Can any one help me in getting understand on the above queries?</p>