Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7910057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:42:49+00:00 2026-06-03T12:42:49+00:00

MongoDB for C#, I started following their tutorial but the compile error I get

  • 0

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 .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:42:51+00:00Added an answer on June 3, 2026 at 12:42 pm

    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.

    var update = MongoDB.Driver.Builders.Update.Set("Name", "Harry");
    

    This will probably get annoying, so you can also create an alias in your header.

    using U = MongoDB.Driver.Builders.Update;
    

    Then, you can change your statement to be this:

    var update = U.Set("Name", "Harry");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I installed MongoDB via Brew and now I get this error: /Library/StartupItems/MongoDB has not
Using MongoDB C# driver ( http://github.com/samus/mongodb-csharp ), seems that I'm unable to get the
I am started using MongoDB few days ago. Everything is fine with MongoDB but
i started with mongodb and played around with random temperature data like this: 'weather'
I'm just getting started with MongoDb and I've noticed that I get a lot
This question is for all NoSQL and specially mongoDB experts out there. I started
I am trying to get a project started in Go and MongoDb. I am
Following MongoDB documentation example seems to be wrong. Any suggestion? a== 1 and a
I'm trying to execute this: <?php // connect $m = new Mongo(); ?> But
I've just started working with mongodb got a perl script that parses a twitter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.