21 Modern C# questions from the C# bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.
Free to start: the 2-minute IT readiness check — six questions and a result.
A.a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
B.an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
C.a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
D.a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
Answer + AI explanation with Pro
2. Which term means: "a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression"?
Mid
A.Top-level statements
B.Primary constructor
C.With-expression
D.Record
Answer + AI explanation with Pro
3. Which statement is correct?
Mid
A.Record — a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
B.Record — a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
C.Record — a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
D.Record — a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
Answer + AI explanation with Pro
4. What is Pattern matching?
Mid
A.language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
B.a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
C.a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
D.a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
Answer + AI explanation with Pro
5. Which term means: "language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables"?
Mid
A.Nullable reference types
B.With-expression
C.Pattern matching
D.Top-level statements
Answer + AI explanation with Pro
6. Which statement is correct?
Mid
A.Pattern matching — a parameter list placed directly on a type declaration whose parameters are in scope throughout the body, available for initializing members
B.Pattern matching — a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
C.Pattern matching — an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
D.Pattern matching — language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
Answer + AI explanation with Pro
7. What is Nullable reference types?
Senior
A.language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
B.a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
C.a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
D.an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
Answer + AI explanation with Pro
8. Which term means: "an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior"?
Senior
A.With-expression
B.Top-level statements
C.Pattern matching
D.Nullable reference types
Answer + AI explanation with Pro
9. Which statement is correct?
Senior
A.Nullable reference types — a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
B.Nullable reference types — a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
C.Nullable reference types — a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
D.Nullable reference types — an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
Answer + AI explanation with Pro
10. What is Init-only setter?
Mid
A.a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
B.language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
C.a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
D.a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
Answer + AI explanation with Pro
11. Which term means: "a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation"?
Mid
A.Record
B.Pattern matching
C.Nullable reference types
D.Init-only setter
Answer + AI explanation with Pro
12. Which statement is correct?
Mid
A.Init-only setter — a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
B.Init-only setter — a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
C.Init-only setter — language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
D.Init-only setter — a parameter list placed directly on a type declaration whose parameters are in scope throughout the body, available for initializing members
Answer + AI explanation with Pro
13. What is Top-level statements?
Mid
A.an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
B.a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
C.language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
D.a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
Answer + AI explanation with Pro
14. Which term means: "a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper"?
Mid
A.Primary constructor
B.Nullable reference types
C.Top-level statements
D.Record
Answer + AI explanation with Pro
15. Which statement is correct?
Mid
A.Top-level statements — a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
B.Top-level statements — a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
C.Top-level statements — an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
D.Top-level statements — a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
Answer + AI explanation with Pro
16. What is Primary constructor?
Senior
A.language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
B.a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
C.a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
D.a parameter list placed directly on a type declaration whose parameters are in scope throughout the body, available for initializing members
Answer + AI explanation with Pro
17. Which term means: "a parameter list placed directly on a type declaration whose parameters are in scope throughout the body, available for initializing members"?
Senior
A.With-expression
B.Top-level statements
C.Nullable reference types
D.Primary constructor
Answer + AI explanation with Pro
18. Which statement is correct?
Senior
A.Primary constructor — a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
B.Primary constructor — an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
C.Primary constructor — a parameter list placed directly on a type declaration whose parameters are in scope throughout the body, available for initializing members
D.Primary constructor — a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
Answer + AI explanation with Pro
19. What is With-expression?
Senior
A.a parameter list placed directly on a type declaration whose parameters are in scope throughout the body, available for initializing members
B.a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
C.a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
D.an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
Answer + AI explanation with Pro
20. Which term means: "a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved"?
Senior
A.With-expression
B.Top-level statements
C.Pattern matching
D.Primary constructor
Answer + AI explanation with Pro
21. Which statement is correct?
Senior
A.With-expression — a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
B.With-expression — a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
C.With-expression — language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
D.With-expression — a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
Answer + AI explanation with Pro
Free to start
Start with a free readiness check
Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Modern C# question come with Pro.