📅  最后修改于: 2022-03-11 15:00:41.561000             🧑  作者: Mango
var result = collection.Find(new BsonDocument("name", "henry")).FirstOrDefault();
if (result != null)
{
Console.WriteLine($"This user has been found with the name {collection["name"]}")
}
else
{
Console.WriteLine("This user has not been found.")
}