It is also referred as a custom data type. Let’s create a class. Go to project folder in solution explorer and right click on it. Go to Add New and than New Item. Than select class from the menu and give class a name and hit add. Walla! Class is ready!
inside of a class which is going to called each time when we create object of that specific class. By default there is a hidden constructor in C# classes unless you modify it. A constructor is a method that has same name as a class. This method will now be accessed by all objects.
property name, majorSubject and percentage. Also lets create a constructor to initialize them Let’s create a method in that class as below to find qualified or not: Note: above 75 % you are qualified.
two types of method that we can define inside of our class which will essentially make your class more secure. It lets you decide what data is valid for specific attribute and what data isn't valid. They are extremely useful.