C# MCQ Test: C# MCQs - Practice Questions
1. Which C# keyword is used to define a method in a class?
2. How do you define a static method in a C# class?
3. What is 'generics' in C#?
4. What is the entry point of a C# program?
5. Which C# keyword is used to indicate that a class cannot be inherited from?
6. What is the difference between 'ref' and 'out' parameters in C#?
7. What is the C# syntax for creating a new instance of a class?
8. What is the purpose of the 'finally' block in a try-catch-finally statement?
9. Which of the following is a reference type in C#?
10. In C#, what keyword is used to define a class?
11. What is 'boxing' and 'unboxing' in C#?
12. Which C# data type is used to store a single character?
13. In C#, what is the purpose of the 'using' statement?
14. How do you define a property in a C# class?
15. What is the purpose of the 'try', 'catch', and 'finally' blocks in C#?
16. Which keyword is used to define a class in C#?
17. In C#, what keyword is used to create an instance of a class?
18. What is the C# operator for subtraction?
19. What is the purpose of the 'volatile' keyword in C#?
20. Which C# keyword is used to handle exceptions?