Introducing DotNetFunda.com on mobile http://m.dotnetfunda.com ! Be with DotNetFunda.com on the go !
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 11129 |  Welcome, Guest!   Register  Login
 Home > Interview Questions > C# Interview Questions > How to declare a method in an Interface? ...

How to declare a method in an Interface?

Interview question and answer by: Raja | Posted on: 6/12/2009 | Category: C# Interview questions | Views: 2527 |


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 
Found interesting? Add this to:


>> Write Response - Respond to this post and get points

Even more ... | Submit Interview Questions and win prizes!

More Interview Questions from Raja

Even more ... | Submit Interview Questions and win prizes!


About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you found plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/21/2012 9:15:51 AM