How to declare a method in an Interface?

 Posted by Raja on 6/12/2009 | Category: C# Interview questions | Views: 8523
Answer:

To declare method in an interface, you just need to write the definition of the method like below.

void ProcessMyData(int id);

string GetMyName(int id);


There is no need of writing the modifier as by default all methods in the interface is public.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response