更新时间:2023-02-23 08:58:24
我通过进行以下更改找到了解决方案,现在它可以正常工作:
I figured out the solution, by making the following changes and it works now:
foreach (BsonDocument nestedDocument in Document["name"].AsBsonArray)
{
Total += Convert.ToDouble(nestedDocument["amount"]);
}