Implementing Interface

Discussion in 'ASP .Net' started by Gomathi, Nov 17, 2005.

  1. Gomathi

    Gomathi Guest

    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
     
    Gomathi, Nov 17, 2005
    #1
    1. Advertising

  2. 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

    "Gomathi" <> wrote in message
    news:...
    > 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
    >
     
    S.M. Altaf [MVP], Nov 17, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Manavendra Gupta
    Replies:
    1
    Views:
    360
    Manavendra Gupta
    Mar 7, 2004
  2. Robert Maas, see http://tinyurl.com/uh3t

    Trouble implementing an interface, strange compiler error

    Robert Maas, see http://tinyurl.com/uh3t, May 15, 2005, in forum: Java
    Replies:
    4
    Views:
    513
    Ross Bamford
    May 15, 2005
  3. golem
    Replies:
    13
    Views:
    788
    Nigel Wade
    Feb 17, 2006
  4. kscho
    Replies:
    1
    Views:
    396
    Rob Williscroft
    Sep 16, 2003
  5. Henry Townsend
    Replies:
    6
    Views:
    445
    Oliver Wong
    May 29, 2006
Loading...

Share This Page