C# Quiz

C# Quiz

1 / 20

What is the correct syntax to declare a variable of type int in C#?

2 / 20

Which of the following is the correct way to create a new instance of a class named Person?

3 / 20

What keyword is used to inherit a class in C#?

4 / 20

Which of the following is a valid access modifier in C#?

5 / 20

Which of the following types does not support inheritance in C#?

6 / 20

What does the override keyword do in C#?

7 / 20

Which of the following statements about interfaces in C# is true?

8 / 20

How do you handle exceptions in C#?

9 / 20

What is the purpose of the using statement in C#?

10 / 20

Which collection is ordered in C#?

11 / 20

Which keyword is used to define a property in a class?

12 / 20

What is the correct way to declare a nullable integer in C#?

13 / 20

What is a delegate in C#?

14 / 20

Which of the following methods is used to sort an array in C#?

15 / 20

What is the base class for all classes in .NET?

16 / 20

How do you declare a constant field in a class?

17 / 20

What does the is keyword do in C#?

18 / 20

Which of the following methods is used to add an element to a List<T> in C#?

19 / 20

What is the purpose of the yield keyword in C#?

20 / 20

What does the readonly keyword do when applied to a field?

Your score is

The average score is 40%

0%

Scroll to Top