Skip to main content

What is an interface?

Entry C#
Quick Answer An interface is a contract รขโ‚ฌโ€ any class that implements it must have these methods and properties. No implementation, just signatures. This lets you write code against the interface rather than a specific class, making things easy to swap, test, and extend.

Answer

A contract that defines method signatures without implementation.

A class must implement all the interface members.


interface IAnimal { void Speak(); }


S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice