Interface class c#

interface class in C#, interface class in c# example, interface class in, Interface vs Abstraction


Interface class is an entity only not a class. Interface classes can not be implemented. Interface class can be implement in sub classes. Interface class can not be instantiated. Interfaces class is utilised in (C#) as a part of  ASP.Net has not capacity of multiple inheritances therefore interface classes are presented with awesome arrangement. With interface classes application turn out to be unpleasantly vigorous and appallingly adaptability in our application. Interfaces class is to a great degree supportive when we are utilising small units of functions, in alternative manner abstraction can be used when large units of functions are used.  A keyword “Interface” is characterise to define the class. Interface class is utilised n sub classes. Interface class has the ability to mark usage to signature implementation.  An interface class has not access modifiers, everything is accepted public.

Interface Class In C#

An interface class can be member of namespace or class can. Interface class can contain signatures for the accompanying individuals.

  • Members
  • Indexers
  • Properties
  • Events

A class ought to execute interface members are indicated in interface class. An illustration is offered underneath to clear more view about interface class.

Interface AbcInterface
          Void TestMethod();
Class Test: AbcInterface
      Void samplemethod()
          //method implementation
     Static Void Main()
       //Declaring the interface instance
       AbcInterface obj = new Test ();
       //Calling the member
       Obj. TestMethod();


In short, Interface class gives incredible adaptability to design application & reduces the complexity of the application. It is highly recommended to use object oriented mythologies (OOPS) to make make application more powerful with perfect and clean code. In my past article clarified about Abstraction class and completely step by step difference between Interface and Abstraction Class

Suggested Reading


Anjan kant

Outstanding journey in Microsoft Technologies (ASP.Net, C#, SQL Programming, WPF, Silverlight, WCF etc.), client side technologies AngularJS, KnockoutJS, Javascript, Ajax Calls, Json and Hybrid apps etc. I love to devote free time in writing, blogging, social networking and adventurous life

Post A Comment: