First you create your class, within your class you put your properties and methods so a class for the student will look like this.
public class Student
{
private string studentId;
public string StudentId
{
get { return studentId; }
set { studentId = value; }
}
private string courseId;
public string CourseId
{
get { return courseId; }
set { courseId = value; }
}
public void Registration()
{
Console.WriteLine(this.studentId + " - " + this.courseId);
}
}
and then and your main function you can instantiate an object student like this
Student student = new Student();
student.StudentId = "1";
student.CourseId = "2";
student.Registration();