Bird
0
0

Which keyword is used to declare an interface in C#?

easy🧠 Conceptual Q1 of 15
C Sharp (C#) - Interfaces
Which keyword is used to declare an interface in C#?
Aenum
Bclass
Cinterface
Dstruct
Step-by-Step Solution
Solution:
  1. Step 1: Identify keywords for type declarations in C#

    The keyword interface is specifically used to declare interfaces, while class, struct, and enum declare other types. Thus, the correct keyword is interface.
  2. Final Answer:

    interface -> Option C
  3. Quick Check:

    Keyword for interface declaration = interface [OK]
Quick Trick: Use 'interface' keyword to declare interfaces in C# [OK]
Common Mistakes:
MISTAKES
  • Using 'class' instead of 'interface'
  • Confusing 'struct' with interface
  • Trying to use 'enum' for interfaces

Want More Practice?

15+ quiz questions · All difficulty levels · Free

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