Bird
Raised Fist0

Which keyword is used in C# to specify that a class implements an interface?

easy🧠 Conceptual Q2 of Q15
C Sharp (C#) - Interfaces
Which keyword is used in C# to specify that a class implements an interface?
Aimplements
Binherits
Cinterface
D:
Step-by-Step Solution
Solution:
  1. Step 1: Recall C# syntax for interface implementation

    C# uses a colon ':' to indicate inheritance or interface implementation.
  2. Step 2: Differentiate from other keywords

    'implements' is not a C# keyword; ':' is used instead.
  3. Final Answer:

    : -> Option D
  4. Quick Check:

    Interface implementation keyword = ':' [OK]
Quick Trick: Use ':' to implement interfaces in class declaration [OK]
Common Mistakes:
MISTAKES
  • Using 'implements' like in Java
  • Confusing 'inherits' with interface implementation
  • Trying to use 'interface' keyword in class declaration

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Sharp (C#) Quizzes