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 Code "Newclient"
