// Traditional approach,
// fluent interface
BsonArray a2 = new BsonArray().Add(1).Add(2);
// Values argument
int[] values = new int[] { 1, 2 };
BsonArray a3 = new BsonArray(values); //It doesn't work in VB.NET
// Collection initializer syntax
BsonArray a4 = new BsonArray { 1, 2 }; //This doesn't work in VB.NET
特别是,我想在MongoDB VB.NET 驱动程序中找到“内部”框。
如何将以下语句合并为一行?
Dim b As New BsonDocument
Dim box As New BsonDocument
Dim d = New BsonArray({{1, 2}, {3, 5}})
box.Add("$box", d)
'box.Add("$box", d)
b.Add("$within", box)
query.Add("$within", box)