C# MCQ Test: C# MCQs - Practice Questions
1. What is 'serialization' in C#?
2. What is the C# operator for logical AND?
3. Which C# data type is used to represent a single character?
4. Which data type is used to store whole numbers in C#?
5. What is the purpose of the 'is' keyword in C#?
6. How do you define a property in a C# class?
7. Which C# keyword is used to indicate that a class cannot be inherited from?
8. Which C# data type is used to store a single character?
9. What does C# stand for?
10. What is the syntax for a single-line comment in C#?
11. Which C# data type is used to represent true or false values?
12. What is 'asynchronous programming' in C#?
13. What is 'method overloading' in C#?
14. What is the purpose of the 'interface' keyword in C#?
15. In C#, what keyword is used to define a constant?
16. What is the default access modifier for class members in C# if no access modifier is specified?
17. What is the primary purpose of the 'using' statement in C#?
18. What is the purpose of the 'finally' block in a try-catch-finally statement?
19. In C#, what is the purpose of the 'using' statement?
20. What keyword is used to define a method that does not return any value in C#?
21. What is 'generics' in C#?
22. What is the primary benefit of using the 'async' and 'await' keywords in C#?
23. What is the default access modifier for class members in C#?
24. Which C# keyword is used to define an enumeration?
25. Which C# keyword is used to exit a method without returning a value?
26. Which C# data type is used to store decimal numbers with high precision?
27. Which C# keyword is used to handle exceptions?
28. What is 'garbage collection' in C#?
29. What is a 'delegate' in C#?
30. In C#, what keyword is used to create an array?
31. What is the difference between 'sealed' and 'abstract' classes in C#?
32. Which C# keyword is used to exit a loop prematurely?
33. What is the purpose of the 'base' keyword in C#?
34. What is the C# syntax for creating a new instance of a class?
35. Which C# operator is used to perform logical AND between two Boolean values?
36. Which of the following is not a primitive data type in C#?
37. What is the purpose of the 'break' statement in a switch statement in C#?
38. Which C# keyword is used to indicate that a method can be overridden in a derived class?
39. What is 'dependency injection' in C#?
40. In C#, what keyword is used to define a class?
41. How do you define an array in C#?
42. What is the purpose of the 'yield' keyword in C#?
43. What is the difference between 'ref' and 'out' parameters in C#?
44. What is the entry point of a C# program?
45. What is 'nullable types' in C#?
46. What is 'attribute-based programming' in C#?
47. What is the purpose of the 'using' directive in a C# program?
48. What is 'reflection' in C#?
49. How do you define a static method in a C# class?
50. What is the purpose of the 'volatile' keyword in C#?