[CSHARP-2142] Create Array update code samples for MongoDB 3.6 page Created: 05/Jan/18  Updated: 28/Oct/23  Resolved: 29/Nov/18

Status: Closed
Project: C# Driver
Component/s: Documentation
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Rathi Gnanasekaran Assignee: Dmitry Lukyanov (Inactive)
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-434 Provide code samples for MongoDB 3.6 ... Closed

 Description   

Please provide C# code for the following Java example :

Array Updates

// 3. Exploiting the power of arrays
MongoCollection<Document> collection = client
  .getDatabase("test")
  .getCollection("arrayUpdatesTest");
 
collection.updateOne(
  Filters.eq("_id", 1),
  Updates.set("a.$[i].b", 2),
 
new UpdateOptions()
  .arrayFilters(
    Collections.singletonList(
      Filters.eq("i.b", 0))));



 Comments   
Comment by Dmitry Lukyanov (Inactive) [ 29/Nov/18 ]

Used example delimiters:

// Start Exploiting The Power Of Arrays Example
// End Exploiting The Power Of Arrays Example

Comment by Githook User [ 28/Nov/18 ]

Author:

{'name': 'Dmitry Lukyanov', 'email': 'dmitry_lukyanov@epam.com', 'username': 'dmitry-lukyanov'}

Message: CSHARP-2142: Add documentation sample for exploiting the power of arrays.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/d24d706caf4317f7568c171218dca5459cd6d72c

Generated at Wed Feb 07 21:41:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.