title: How to resolve this error: await and cursor does not exist in current context
body: <pre><code>private void button10_Click(object sender, EventArgs e)
  {
      var db = mongo.GetDatabase("milk123");
      mongo.Connect();
      var collection = db.GetCollection&lt;BsonDocument&gt;("stock123");
      using (var cursor = await col.Find(new BsonDocument()).ToCursorAsync())
      {
          while (await cursor.MoveNextAsync())
          {
              foreach (var doc in cursor.Current)
              {
                  Console.WriteLine(doc);
              }
          }
      }
  }
  </code></pre>
  
  <p>On executing it i am getting the following error:</p>
  
  <p>await and cursor does not exist in current context.</p>