title: I am Totally lost Using Derived Classes in C# Visual 2010
body: <p>This Is my Assignment, I am having Troubles Getting my Class To Work With main for, Can Someone please Help Me, This is due on Tuesday and I have been hitting a brick wall in every approach I have tried. all my class and my forms are posted. Please Help me I am totally lost and frustrated
  1.Employee and ProductionWorker Classes </p>
  
  <p>Create an Employee class that has properties for the following data: 
  •Employee name 
  •Employee number</p>
  
  <p>Next, create a class named ProductionWorker that is derived from the Employee class. </p>
  
  <p>The ProductionWorker class should have properties to hold the following data:
  •Shift number ( an integer, such as 1, 2, or 3) 
  •Hourly pay rate The workday is divided into two shifts: day and night.</p>
  
  <p>The Shift property will hold an integer value representing the shift that the employee works. The day shift is shift 1 and the night shift is shift 2. </p>
  
  <p>Create an application that creates an object of the ProductionWorker class and lets the user enter data for each of the object’s properties. Retrieve the object’s properties and display their values. </p>
  
  <p>This Is My Employee Reference Chart. To Store Their Names And I.D Numbers I am getting no compiling errors on this class, however I am not sure if I am doing this correctly because in my main I get a compiling error.</p>
  
  <p>I assume I need an array to store all the data that will be inputted into my TextBox in visual</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  namespace Employee_References
  {
    class Roster
  {
   // Field for name, ID, dept, and position  
   private const int NAMES = 100;
   private static string [] employee = new string [NAMES];
   private const int NUMBER = 100;
   private static int [] id = new int [NUMBER];
   private int total = 0;
  
  
  
   public void Employee()
   {
       total = 0;
   }
  
    // This will recieve input from my main 
    public static void employeeName (string [] xArray)   
  
  {
          for (int index = 0; index &lt; xArray.Length; index++)
          {
              xArray[index] = employee[NAMES];
          }
  }
  
  
     // This will recieve input from my main 
     public static void idNumber ( int [] zArray)
  {
     for (int index = 0; index &lt; zArray.Length; index++)
      {
          zArray[index] = id[NUMBER];
      }
  }
  
  
   }
  </code></pre>
  
  <p>} </p>
  
  <p>This will be my next class that is derived from my first class as my assignment requested. This class is suppose to store the shift numbers 1 through for 4, and an hourly wage setter for a Day and Night Shift. I am getting one compiling error in this class that says " The left-hand side of an assignment must be a variable, property or indexer" I am not sure What it is telling me, can someone please explain what it is trying to tell me. Am I doing this correctly?</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
     namespace Employee_References
     {
        class References : Roster
     {   
  
      // Field for name, ID, dept, and position  
  
      private int shift;
      private static const double PAYRATEDAY = 12.75;
      private static const double PAYRATENIGHT = 15.75;
  
  
  
   public void Employee()
   {
  
   }
  
    // This will recieve input from my main 
    public int shifts   
  
  {  
      set {shift = value;}  // this set the recieve value of name one and set it to name1
      get {return shift; }  //this will get name1 and send it to my main.
  
  }
  
  
     // This will recieve input from my main 
     public double payrate1 
     {
      set { PAYRATEDAY = value; } // ERROR!!The left-hand side of an assignment must be a variable, property or indexer
      get { return PAYRATEDAY; }  
  
     }
  
  
    // This will recieve input from my main 
    public double payrate2 
     {
         get { return PAYRATENIGHT; } // ERROR!!The left-hand side of an assignment must be a   variable, property or indexer
         set { PAYRATENIGHT = value; }          
     }
  }
  </code></pre>
  
  <p>This is my Form, I am trying to send my input values into my class my "Roster" class That has an array of 100. How ever I keep getting a compiling error that says " Cannot assign to 'employeeName' because it is a 'method group". I am not sure What It is telling me can some one explain this to me, and give me some pointer on how to do this</p>
  
  <pre><code>using System;
  using System.Windows.Forms;
  
  namespace Employee_References
  {
  public partial class Form2 : Form
  {
      public Form2()
      {
          InitializeComponent();
      }
  
      private void button1_Click(object sender, EventArgs e)
      {
          Roster Chart = new Roster();
          Chart.employeeName = name.Text; // Error **Cannot assign to 'employeeName' because it is a 'method group**".  
      }
  }
  </code></pre>
  
  <p>}</p>