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