Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

what is an interface

This is a discussion on what is an interface within the C# forums, part of the Software Development category; what is interface in c#?...

Go Back   Geeks Talk > Software Development > C#
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 08-24-2009
Junior Member
 
Join Date: Aug 2009
Location: chennai
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
dprakashraj is on a distinguished road
what is an interface

what is interface in c#?
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-25-2009
Expert Member
 
Join Date: May 2009
Location: Bangalore
Posts: 989
Thanks: 155
Thanked 420 Times in 201 Posts
rijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nice
Re: what is an interface

Hi Prakashraj,

An interface contains only the signatures of methods, delegates or events. The implementation of the methods is done in the class that implements the interface, as shown in the following example:

interface ISampleInterface
{
void SampleMethod();
}

class ImplementationClass : ISampleInterface
{
// Explicit interface member implementation:
void ISampleInterface.SampleMethod()
{
// Method implementation.
}

static void Main()
{
// Declare an interface instance.
ISampleInterface obj = new ImplementationClass();

// Call the member.
obj.SampleMethod();
}
}

Thanks & Regards,
Riju.
Reply With Quote
Reply

  Geeks Talk > Software Development > C#

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Interface mahasang2k OOPS 5 08-27-2009 03:23 AM
Interface has too many methods Geek_Guest QTP 1 09-11-2007 09:16 AM
API/Interface for implementing MRC ssriramkumar SQL 0 05-28-2007 03:41 AM
COM interface JobHelper QTP 1 03-30-2007 02:07 PM
interface..... psuresh1982 Java 1 01-08-2007 01:40 PM


All times are GMT -4. The time now is 06:24 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved