i know this question is already exist in
https://stackoverflow.com/questions/4621300/how-to-sum-the-value-of-a-key-across-all-documents-in-a-mongodb-collection
but in that thread doesnt have a c# answer code, so i would like to re - ask the same question
here is my collection in mongodb
[{
"_id": {
"$oid": "5f310a3e644ddd24c86c961f"
},
"user_no": "USR-123123",
"user_name": "Andrew Franklyn",
"balance": 500000,
"domicile": "Bali"
},{
"_id": {
"$oid": "5f310a9c9a71032c605176ba"
},
"user_no": "USR-9931021",
"user_name": "Franklyn CJ",
"balance": 304040,
"domicile": "Bali"
},{
"_id": {
"$oid": "5f310abe9a71032c605176bb"
},
"user_no": "USR-42294",
"user_name": "Jonathan Joestar",
"balance": 123000,
"domicile": "New York"
}]
i want to sum all the key balance value and put it in a variable but i dont how to do it
please help