Pergunta de entrevista da empresa Deloitte

questions related with interface in c#. 1) what is interface? why we call it interface why not we can call it a class? can we define protected members in interface?

Respostas da entrevista

Sigiloso

21 de jun. de 2018

Interface are public, we can't declare other access specifiers

4

Sigiloso

18 de jan. de 2018

brief- While answering interface question in interview think at broad level interface is agreement between two parties (e.g. remote is interface between user and TV where lots of functionalities expose to user in term of function - channel change ,increase volume ,decrease volume etc.) C# interface- Allows only method declaration it won't allow method definition. declare using keyword interface ,One class can implement many interface ( achive muiltiple inheritance ) By default member of interface are public.