MongoDBDriver/Collection.cs
/// <summary>
/// Updates a document with the data in doc as found by the selector.
/// </summary>
/// <param name="doc">The <see cref="Document"/> to update with
/// </param>
/// <param name="selector">
/// The query spec to find the document to update.
/// </param>
/// <param name="flags">
/// <see cref="UpdateFlags"/>
/// </param>
Updates a document with the data in doc as found by the selector.
Updates a document with the data in doc as found by the selector .
public void Update(Document doc, Document selector, UpdateFlags flags){
            UpdateMessage um = new UpdateMessage();
            um.FullCollectionName = this.FullName;
            um.Selector = selector;
            um.Document = doc;
            um.Flags = (int)flags;
            try{
                this.connection.SendMessage(um);
            }catch(IOException ioe){
                throw new MongoCommException("Could not update document, communication failure", this.connection,ioe);
            }           
        }
public void Update ( Document doc , Document selector , UpdateFlags flags ) { UpdateMessage um = new UpdateMessage ( ) ; um . FullCollectionName = this . FullName ; um . Selector = selector ; um . Document = doc ; um . Flags = ( int ) flags ; try { this . connection . SendMessage ( um ) ; } catch ( IOException ioe ) { throw new MongoCommException ( " " , this . connection , ioe ) ; } }
Updates a document with the data in doc as found by the selector.
Updates a document with the data in doc as found by the selector .
doc
Document
The  to update with
The to update with
selector
Document
The query spec to find the document to update.
The query spec to find the document to update .
flags
UpdateFlags
None