The meaning of Interface-VBForums
Results 1 to 7 of 7

Thread: The meaning of Interface

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2005
    Posts
    17

    Post The meaning of Interface

    Hellow

    Can anyone please help me in understanding what is the meaning of Interface ? I've been reading the MSDN. But, I just can not understand them.

    My understanding of Interface class is a class that can not be inherited (the exact opposite of abstract (c#) or mustInherit(VB), Is that rite ???

    The what's the meaning of an Interface method ???


    Thanks

  2. #2
    Hyperactive Member GlenW's Avatar
    Join Date
    Nov 2001
    Location
    Gateshead, England
    Posts
    479

    Re: The meaning of Interface

    An interface is a class that provides rules for classes that inherit from it.
    You can inherit from multiple interfaces.

  3. #3
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: The meaning of Interface

    Maybe someone can enlighten us further by describing the difference between abstract and interface classes
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  4. #4
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,191

    Re: The meaning of Interface

    An interface is just a template. It does not implement any functions at all. But it makes sure that every class that inherits from it, is BOUND to have the functions listed in the interface.


    An abstract class means that you can not instansiate objects from it. It does not mean that you can't have non abstract functions in the class. But for an intercace all functions are implisitly abstract.


    Summary:
    - Interface does not have any implementation at all. An abstract class can have non abstract methods that has implementation.
    - A class can inherit from as many interfaces as you want. But for simplicity, a class can only inherit from ONE abstract class.


    Hope I got it all. Questions are welcome.
    - ии -

  5. #5
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: The meaning of Interface

    Now that make sense. Thanks NoteMe

    Hey, anyone know about a proper walkthrough that take you through the process of let you create a application using all the OOP concepts, and implementations of them in C#. I'm sure one will get a lot by searching, just asking if someone knows a good one.
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  6. #6
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,191

    Re: The meaning of Interface

    I am not 100% sure what you are asking for. Is it tutorials? Well if so I have bookmarked what I skimmed through when I started C# a couple of months ago. It contains tutorials for all the big aspects of C#. And OOP.


    http://www.csharp-station.com/Tutorial.aspx




    - ии -

  7. #7
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: The meaning of Interface

    For example : example

    Would like to find a tutorial / walkthrough kind of thing demonstrating using OOP at advanced level.
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.