title: Trying to get all values of a specific key in a MongoDB Collection using Distinct(), but I'm getting a cursor as the result instead of an array
body: <p>I'm using Visual Studio 2019 with C# MongoDB Driver v2.13.</p>
  <p>I'm trying to get the values of a specific key in a MongoDB Collection using Distinct(), but I'm getting a cursor as the result instead of an array.</p>
  <p>My code:</p>
  <pre><code>var settings = MongoClientSettings.FromConnectionString(&quot;&lt;connectionstring&gt;&quot;);
  var dbClient = new MongoClient(settings);
  var database = dbClient.GetDatabase(&quot;players&quot;);
  var newcollec = database.GetCollection&lt;BsonDocument&gt;(&quot;sampleplayer&quot;);
  FieldDefinition&lt;BsonDocument, int &gt; field = &quot;Salary&quot;;
  var test = newcollec.Distinct(field, new BsonDocument());
   
  </code></pre>
  <p>I'm expecting to get an array with all the values, but I'm getting <code>MongoDB.Driver.SingleBatchAsyncCursor`1[System.Int32]</code></p>