Briefly The Importance Of Interfaces

Can Yüksel
2 min readApr 28, 2022

--

Hi Everyone,

Let’s examine to interfaces Today. Now let’s examine the importance and necessity of interfaces together. Interfaces contain methods that must be included in classes that derive from them. So we use to be inherit interface implement to classes. Interfaces usually begin to “I” for example: ” IUserService ”. That’s use to not compulsory but that’s use to important for team work.

Interfaces not include constructor and No identifiers such as private, public . By default, all methods inside them are considered public.

For Example:

Interfaces implement to classes so that’s kind of structures we say ” inherit”.

For Example:

General features for interfaces:

· Objects cannot be created with the new keyword.

· It specifies what a class should do, not how it should do it.

· By default, all Interface members are defined as abstract and public. You don’t need to specify it specifically.

· A class can inherit more than one interface, multiple-inheritance is supported.

· It contains only the signatures of the methods, they cannot contain any filled methods.

References

https://docs.microsoft.com/tr-tr/dotnet/csharp/language-reference/keywords/interface

--

--

Can Yüksel
Can Yüksel

Written by Can Yüksel

I’m Mining and software Engineer. I’m study at Dokuz Eylül University. I share the information I learned while developing myself in the field of software.

No responses yet