MongoDB for C#, I started following their tutorial but the compile error I get is on this line:
http://www.mongodb.org/display/DOCS/CSharp+Driver+Quickstart
var update = Update.Set("Name", "Harry");
saying
System.Windows.Forms.Control.Update()’ is a ‘method’, which is not
valid in the given context.
The only difference I see is that they have used a Console Application but I created a C#WinForms applications and pasted their code inside a button click .
Update is simply ambiguous in the context you are using the call. You need to qualify the Update statement to include the namespace it is in.
This will probably get annoying, so you can also create an alias in your header.
Then, you can change your statement to be this: