Declaration and Implementation
In this lesson, you will learn about the declaration and implementation details of a class.
Declaration
In C#, we declare classes in the following way:
class ClassName // Class name{/* All member variablesand methods */}
The keyword class
tells the compiler that we are creating our custom class. All the members of the class will be defined within the class scope, i.e., inside the curly brackets, {...}
.
Creating a Class Object
The name of the class, ClassName
, will be used to create an instance/object of the class in our ...