Introduction
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 asp.net (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.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(); } }
Post A Comment:
0 comments: