title: How to declare get and set accessors of a List property of a class
body: <p>I have a Teacher class  which has a property </p>
  
  <pre><code>class Teacher:Employee
      {
          //private List&lt;string&gt; SubjectTaughtList = new List&lt;string&gt;();
  
          public string SubjectTaught { get; set; }
  
          public string Qualification{ get; set; }
  
          public Teacher() { }
  
          public Teacher(string id,string title, string fn,string ln, DateTime dob, 
                         string gender,string houseno,string street,string city,string county,
                         string phone,string workPhone, string email,string workEmail,DateTime doj,
                         string status,decimal sal,List&lt;string&gt; subject,string qualification)
              : base(id, title, fn,ln, dob, gender,houseno,street,city,county, phone, 
                     workPhone, email, workEmail, doj, status, sal)
          {
              SubjectTaught = subject;
              Qualification = qualification;
          }
      }
  </code></pre>
  
  <p>I want to create a list for SubjectTaught as it will have more than one value. I am creating a checkedListbox in windows form but I don't know how to get and set the property.</p>
  
  <p>I think it should be read-only as I already have the values for the list for eg Art,Law,etc or may be I am wrong as I the list will be created as per the checked listbox.</p>
  
  <p>I am new to C# so I am at beginner level so very confused as to how  it will work. Please advise</p>