What is the 'class' keyword used for in C#?
Experience Level: Junior
Tags: C#
Answer
The 'class' keyword is used to define a new class. The 'class' keyword is followed by the class name and curly brackets that contain the body of the class. The class name should contain only alphanumeric characters and it cannot start by a digit. It is a best practice to make each first letter of each word upper case.
Related C# job interview questions
What is a breakpoint in C# good for?
C# JuniorHow many classes should be in one .cs file and why?
C# JuniorWhat is C#?
C# JuniorWhat is a method parameter in C#?
C# JuniorWhat is a method return type in C#?
C# Junior