title: Does not contain definition for this
body: <p>I'm new to C# and its been really difficult for me. I'm writing this program in C# and this is error that I'm facing.</p>
  
  <blockquote>
    <p>Error 1   'Lab1.Invoice' does not contain a definition for 'partNumber' and no extension method 'partNumber' accepting a first argument of type 'Lab1.Invoice' could be found (are you missing a using directive or an assembly reference?)   </p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>    using System;
  
  
      namespace Lab1
      {
          class InvoiceTest
          {
              static void Main(string[] args)
              {
                  string partNumber, partDescription;
                  int quantity;
                  decimal Iprice;
  
                  Console.WriteLine("Part Number:");
                  partNumber = Console.ReadLine();
  
                  Console.WriteLine("Part Description:");
                  partDescription = Console.ReadLine();
  
                  Console.WriteLine("Quantity:");
                  quantity = Convert.ToInt32(Console.ReadLine());
  
                  Console.WriteLine("Price:");
                  Iprice = Convert.ToDecimal(Console.ReadLine());
  
  
  
                  Invoice invoice = new Invoice(partNumber, partDescription, quantity, Iprice);
  
                  Console.WriteLine("Order: ");
                  Console.WriteLine("Part Number: {0}", invoice.partNumber);
                  Console.WriteLine("Description: {0}", invoice.pDescription);
                  Console.WriteLine("Quantity: {0}", invoice.Quantity);
                  Console.WriteLine("Price: {0}", invoice.Price);
                  Console.WriteLine("Total: {0}", invoice.GetInvoiceAmount());
  
              }
          }
      }
  
  Here is the code for Invoice:&lt;br&gt;
  namespace Lab1
  {
      class Invoice
      {
          private int qty;
          private decimal price;
          private string pNumber { get; set; }
          private string pDescription { get; set; }
  
          public Invoice(string partNumber, string partDescription, int quantity, decimal Iprice)
          {
              pNumber = partNumber;
              pDescription = partDescription;
              Quantity = quantity; 
              Price = Iprice;
          }
  
          public int Quantity
          {
              get 
              { 
                  return qty; 
              }
  
              set
              {
                  if (value &gt; 0)
                      qty = value;
                  else
                      qty = 1;
              }
          }
  
          public decimal Price
          {
              get
              {
                  return price;
  
              }
  
              set
              {
                  if (value &gt; 0)
  
                      price = value;
  
                  else
                      price = 1;
              }
  
          }
  
          public decimal GetInvoiceAmount()
  
  
          {
              return Quantity * Price;
          }
  
  
      }
  }
  </code></pre>