title: MongoDB and C# Find()
body: <p>I have the below code and I am new to mongodb, I need help in finding an specific element in the collection.</p>
  
  <pre><code>using MongoDB.Bson;
  using MongoDB.Driver;
  namespace mongo_console    {
  
  public class User    {
      public ObjectId Id { get; set; }
      public string name { get; set; }
      public string pwd { get; set; }
  }
  class Program    {
      static void Main(string[] args)
      {
          MongoClient client = new MongoClient();
          MongoServer server = client.GetServer();
          MongoDatabase db = server.GetDatabase("Users");
          MongoCollection&lt;User&gt; collection = db.GetCollection&lt;User&gt;("users");
  
          User user = new User
          {
              Id = ObjectId.GenerateNewId(),
              name = "admin",
              pwd = "admin"
          };
          User user2 = new User
          {
              Id = ObjectId.GenerateNewId(),
              name = "system",
              pwd = "system"
          };
          collection.Save(user);
          collection.Save(user2);
  
          /*
           * How do I collection.Find() for example using the name
           */
    }
  }
  }
  </code></pre>
  
  <p>Once I find the user I will like to print it, is that posible or will find only return the position? if so, how do I print it?</p>
  
  <p>I have seen some examples collection.Find(x => x.something) but I do not know what that x is or mean</p>