MongoDB.Driver.Document.Insert C# (CSharp) Method

Insert() public method

Adds an item to the Document at the specified position
public Insert ( String key, Object value, int Position ) : void
key String
value Object
Position int
return void
        public void Insert(String key, Object value, int Position)
        {
            Dictionary.Add(key, value);
            //Relies on ArgumentException from above if key already exists.
            orderedKeys.Insert(Position,key);
        }