title: command.parameters.addwithvalue not working
body: <p>I have experienced a problem when saving a record using parameters the following is my code </p>
  
  <pre><code>try
  {
      string usd = "USR" + randomnumber(001, 1000).ToString();
      dbconn.poconne.Open();
      string useradd = "insert into users values(@userid,@username,@password,@email,@department,@log)";
  
      using (NpgsqlCommand cmdadd = new NpgsqlCommand(useradd, dbconn.poconne))
      {
          cmdadd.Parameters.AddWithValue("@userid", usd);
      }
  }
  catch (Exception er)
  {
      MessageBox.Show(er.Message);
  }
  </code></pre>
  
  <p>I get this error</p>
  
  <blockquote>
    <p>Error 1   'Npgsql.NpgsqlParameterCollection' does not contain a
    definition for 'AddWithValue' and no extension method 'AddWithValue'
    accepting a first argument of type 'Npgsql.NpgsqlParameterCollection'
    could be found (are you missing a using directive or an assembly
    reference?)   C:\Users\ICT PGL\Documents\Visual Studio
    2010\Projects\officeautomation\customercare\customercare\users.cs 34  39  customercare</p>
  </blockquote>
  
  <p>Any help on solving the error please</p>