An object reference is required for the non-static field, method, or property 'extractDB.Properties.Settings.MasterConnectionString.get'
<pre><code>namespace extractDB
{
class ConsoleApp2
{
    static void Main(string[] args)
    {
        string dog ="fancy";
        string shep = "shepherd";
        Add _add = new Add();
        _add.Ex(45, dog, shep);
    }
}
class Add
{
    public void Ex(int weight, string name, string breed)
    {

  using (SqlConnection con = new SqlConnection(extractDB.Properties.Settings.MasterConnectionString))
        {
            con.Open();
            try
            {
  using (SqlCommand command = new SqlCommand("INSERT INTO format(@Weight,@Name,@breed)", con))
                {
                    command.Parameters.Add(new SqlParameter("Weight", weight));
                    command.Parameters.Add(new SqlParameter("Name", name));
                    command.Parameters.Add(new SqlParameter("Breed", breed));
                    command.ExecuteNonQuery();
                }
            }

            catch
            {
                Console.WriteLine("count not inserted");
            }

        }

      }

  }
}
</code></pre>

<p>I'm getting an error message because of "extractDB.Properties.Settings.MasterConnectionString."</p>

<p>I checked in the app.config and settings.settings files and that's the string app.config gives me. I even tried adding in </p>

<pre><code>static void Ex(int weight, string name, string breed)
</code></pre>

<p>but it doesn't get rid of the error message.</p>

<p>So yeah kind of lost on this one.</p>
