Problem with MongoCursor.

419 views
Skip to first unread message

Jeffrey

unread,
Feb 27, 2012, 10:52:24 PM2/27/12
to mongodb-csharp
When I invoke MongoCUrsor's methods SetLimit() and SetSkip(), an
exception happens:"A MongoCursor object cannot be modified once it has
been frozen." What does it means"frozen"? And how to "thaw" a
Mongocursor object?

Robert Stam

unread,
Feb 27, 2012, 11:42:13 PM2/27/12
to mongodb...@googlegroups.com
A MongoCursor is frozen once you begin iterating over it. Once it is frozen you cannot call any methods that modify it.
What you do is create a new cursor and modify it instead.
Reply all
Reply to author
Forward
0 new messages