🟣

C# MCQ

Test your C# knowledge with 100 multiple choice questions covering fundamentals to advanced concepts, with instant feedback and explanations.

100 Questions 40 Beginner 40 Intermediate 20 Advanced
1

What company developed C#?

2

What runtime executes C# code?

3

How do you print to the console in C#?

4

What keyword is used to declare a variable that cannot be reassigned?

5

Which C# data type stores a sequence of characters?

6

What is the entry point of a C# console application?

7

What is a namespace in C#?

8

What does the var keyword do in C#?

9

What is an interface in C#?

10

What is the difference between class and struct in C#?

11

What is a property in C#?

12

What does the override keyword do?

13

What is the purpose of using statement?

14

What is LINQ?

15

What are generics in C#?

16

What is a delegate in C#?

17

What is an event in C#?

18

What does async/await do in C#?

19

What is the null-conditional operator ?. in C#?

20

What is the null coalescing operator ?? in C#?

21

What is an enum in C#?

22

What is exception handling in C# using try-catch?

23

What is an array in C#?

24

What is a List<T> in C#?

25

What is the difference between == and .Equals() for strings in C#?

26

What is the sealed keyword in C#?

27

What is string interpolation in C#?

28

What is a static class in C#?

29

What does the base keyword do?

30

What is the purpose of IDisposable?

31

What is a lambda expression in C#?

32

What is the difference between Task and Thread in C#?

33

What is an abstract class in C#?

34

What does the as keyword do?

35

What is boxing in C#?

36

What is a partial class?

37

What is the => syntax used for in property declarations?

38

What is the difference between Array and ArrayList in C#?

39

What is the this keyword in C#?

40

What are primary constructors in C# 12?

1

What is the difference between IEnumerable<T> and IQueryable<T>?

2

What is a Task in C# and how does it differ from void async methods?

3

What is the IEnumerable<T> interface and yield return?

4

What is the difference between Func<T, TResult> and Action<T>?

5

What is a record type in C# (C# 9+)?

6

What are nullable reference types in C# 8+?

7

What is pattern matching in C#?

8

What are extension methods in C#?

9

What is the difference between ref and out parameters?

10

What is an indexer in C#?

11

What is covariance and contravariance in C# generics?

12

What is a CancellationToken?

13

What is the difference between lock and Monitor in C#?

14

What is an attribute in C#?

15

What is LINQ's deferred execution?

16

What is the Span<T> type in C#?

17

What does ConfigureAwait(false) do?

18

What is the difference between ValueTask and Task?

19

What is a source generator in C#?

20

What is the init accessor in C# 9?

21

What is an implicit operator in C#?

22

What is the Decorator pattern in C# and when would you use it?

23

What is the purpose of IAsyncEnumerable<T>?

24

What is the difference between string and StringBuilder for performance?

25

What is a Lazy<T> in C#?

26

What is the using declaration (C# 8)?

27

What is object pooling in C# and when should you use it?

28

What is the IProgress<T> interface?

29

What is the difference between Func<T, TResult> and Expression<Func<T, TResult>>?

30

What are channels in .NET System.Threading.Channels?

31

What is the Action<> and Func<> delegate shorthand for?

32

What are default interface methods in C# 8?

33

What is top-level statements in .NET 6+?

34

What is the Roslyn API?

35

What is the File-Scoped Namespace in C# 10?

36

What is global using in C# 10?

37

What is collection expressions in C# 12?

38

What is the frozen collections in .NET 8?

39

What is the difference between IEnumerable and IReadOnlyCollection in C#?

40

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