How Interface members can be declare ?

How Interface members can be declare ?

Interface:-The interface keyword declares a reference type that has abstract members. The interface declaration takes the form:

[attributes] [modifiers] interface identifier [:base-list] {interface-body}[;]
where: 

attributes (Optional):- 
Additional declarative information. 
modifiers (Optional) :-
The allowed modifiers are new and the four access modifiers. 
identifier :-
The interface name. 
base-list (Optional) :-
A list that contains one or more explicit base interfaces separated by commas. 
interface-body :-
Declarations of the interface members. 

example:-
        public interface A

    {

        void show(string s);

    }
 public interface b

    {

        void get(string s);

    }
class d: a,b
{
}
 

By:kamal
Date:2015-10-10 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Links

C interview questions and answers for experienced and fresher