Results 1 to 7 of 7

Thread: Inhertinace

  1. #1
    Junior Member
    Join Date
    Dec 2007
    Answers
    1

    Question Inhertinace

    how many types of inheritance posible in c# using .net.


  2. #2
    Junior Member
    Join Date
    Jun 2008
    Answers
    1

    Unhappy Re: Inhertinace

    5 inhertinace

    1. single
    2. Mulitple
    3. Multilevel
    4. hybride
    5. hierarical


  3. #3
    Junior Member
    Join Date
    Jun 2008
    Answers
    1

    Re: Inhertinace

    Quote Originally Posted by abhi.raj4u View Post
    how many types of inheritance posible in c# using .net.
    No only 3 types of inheritance are possible as far as C# is concerned
    1. Single
    2.Multi level
    3. Hierarchical


  4. #4
    Junior Member
    Join Date
    Apr 2008
    Answers
    15

    Re: Inhertinace

    C# support two types of inheritance.
    1.Implementation Inheritance
    2.Interface Inheritance.

    Implementation Inheritance:

    If a class is derived frm another class such that it inherits all the members of base class then it is implementation inheritance.

    Interface Inheritance:

    when a class inherits only signatures of functions frm another calss then it's known as interface inheritance......


  5. #5
    Junior Member
    Join Date
    Jun 2008
    Answers
    1

    Thumbs up Re: Inhertinace

    Quote Originally Posted by ushalakshmi View Post
    C# support two types of inheritance.
    1.Implementation Inheritance
    2.Interface Inheritance.

    Implementation Inheritance:

    If a class is derived frm another class such that it inherits all the members of base class then it is implementation inheritance.

    Interface Inheritance:

    when a class inherits only signatures of functions frm another calss then it's known as interface inheritance......
    it is nice to see the details from you... shankar


  6. #6
    Expert Member
    Join Date
    Dec 2007
    Answers
    138

    Re: Inhertinace

    There are two types of inheritance used in modern programming languages. C# and other .NET languages use single inheritance. This means that a subclass may only inherit functionality from a single base class.

    Multiple inheritance permits a subclass to have two or more superclasses. In this situation the derived class inherits functionality from several base classes. Multiple inheritance is not supported by C# or the .NET framework. However, this does not stop a class from providing many public interfaces as will be seen in a later article.

    PLease let me know if i am wrong or missing something


  7. #7
    Junior Member
    Join Date
    Jul 2007
    Answers
    18

    Re: Inhertinace

    C# does not support multiple implementation inheritance. A class cannot be derived from more than one class. However, a class can be derived from multiple interfaces.


  8.  Sponsored Ads
    Ad


     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact