title: C# overloading properties
body: <p>I want my object to be able to type in an <strong>double</strong> or a <strong>string</strong> such as getting an input for salary. I have my code working with a property that allows for a <strong>double</strong> only. I know that property overloading isn't supported from the other postings at this site. I also know that setters are going to allow me to get an string input for salary. I don't understand how to overload. I have some of the template code here:</p>
  
  <pre><code>private double salary = 20000;
  
  public Employee()
  {
  }
  
  public Employee(double sal)
  {
      salary = sal;
  }
  
  public double Salary
  {
      get { return salary; }
      set { salary = value; }
  }
  
  public void SetSalary(string sal)
  {
      salary = Convert.ToString(sal);       
  }
  </code></pre>
  
  <p>Error code: </p>
  
  <blockquote>
    <p>can not implicitly covert type string to double</p>
  </blockquote>
  
  <p>I want to be able to have an object be able to overload salary using a setter in C#. I am a student and understand most of the basics. Thanks ahead of time for any help.</p>