Which C# access modifier limits a member to derived classes that are in the same assembly?
Correct answer C. private protected
Topic / 95 questions
Page 2 of C# multiple-choice questions with answers. Tap an option to check yourself.
Page 2 of 5
Correct answer C. private protected
Correct answer D. Anywhere in the same assembly, or in derived classes in any assembly
Correct answer B. private
Correct answer B. A default implementation used when the implementing class does not provide one
Correct answer A. It prevents other classes from inheriting from it
Correct answer A. It cannot be instantiated directly and may contain abstract members without bodies
Correct answer B. A
Correct answer C. B
Correct answer D. base
Correct answer D. bool
Correct answer B. To give callers a Dispose method that releases unmanaged or expensive resources deterministically
Correct answer D. A KeyNotFoundException is thrown
Correct answer A. Because IEnumerable<out T> is covariant in T
Correct answer B. null for reference types and the zero value for value types
Correct answer C. where T : new()
Correct answer C. Outside code can only subscribe with += and unsubscribe with -=, not invoke or replace it
Correct answer C. The return value of the last method in the invocation list
Correct answer D. 333
Correct answer B. Action<string>
Correct answer B. The return type