all groups > dotnet faqs > november 2005 >
You're in the

dotnet faqs

group:

Implementing Interface


Implementing Interface Gomathi
11/17/2005 12:00:00 AM
dotnet faqs: hi all,

How to implement an interface in ASP.Net?.
Consider my interface name is IExample. Then whatz mean by
IExample ie = (IExample)obj1

Kindly let me know about this implementing interface in detail.

Thanks in advance.

Regards,
Gomathi

Re: Implementing Interface S.M. Altaf [MVP]
11/17/2005 12:00:00 AM

Hi Gomathi,

When it comes to interfaces, it doesn't matter if you're using ASP.NET or
Winforms. It's about the language.

You can implement an interface by doing something like this:

interface IF111

{

void MyFunction();

}

class Test1:IF111 //<---------------------------looky here

{

void IF111.MyFunction()

{

Console.WriteLine("MyFunction implemented.");

}

}


You can check out a more detailed example here:
http://www.codersource.net/csharp_tutorial_interface.html

HTH
Altaf

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com

[quoted text, click to view]

AddThis Social Bookmark Button