Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

public void

I’m working on the below C# code and am getting two errors that I’m not sure how to resolve. The errors are: 1) ‘Course.setName()’: not all code paths return a value and 2) Cannot assign to ‘setName’ because it is a ‘method group’.

Here is the code:

namespace CreateClassesObjs

{

  partial class Course

  {

    private string name = “”;

    public void setName(string name)

    {

      this.name = name;

    }

    private string setName()

    {

      setName = name;

    }

    public override string ToString()

    {

      return setName();

    }

  }

}

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"