I'm just trying to make a basic program and here is part of my instructions:
- Create a class "Course".
- create a constructor with two string parameters "courseId" and "courseName".
- create two string data members "CID" with property "ID"(set, get), and "CName" with property "Name"(set, get).
For one, I don't understand how to have a string property "ID", when the data member already has a name, and the property is get and set.
Also, my code gives me an error code CS8180 ( { or ; or => expected ). When I click on the error, it leads me to the space after my set. Take a look:
using System;
class Course
{
public string CID { get; set }
public void CourseInfo(string courseId, string courseName)
{
}
}