© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•11mo ago•
42 replies
Faker

✅ When to use interfaces and why

Hello guys, sorry to disturb you all; I understood how to implement interfaces, thinking of it like a kind of contract that we can implement. The thing is, say I need to perform some
CRUD
CRUD
operations on a particular entity, say
Student
Student
entity, I would create a class for the student CRUD operations and create methods like adding new students, deleting existing student etc... My question is, in such cases, is it a good choice to just define an interface that list the method to be used for the
CRUD
CRUD
operations? If so, can someone explain why please
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Abstract classes / Interfaces, why do we use them?
C#CC# / help
2y ago
Events when implementing Interfaces
C#CC# / help
3y ago
when to use switches and when to use if statements?
C#CC# / help
2y ago
❔ Interfaces, IEnumerator and IEnumerable
C#CC# / help
3y ago