Geeks Talk

Prepare for your Next Interview




Inhertinace

This is a discussion on Inhertinace within the C# forums, part of the Software Development category; how many types of inheritance posible in c# using .net....


Go Back   Geeks Talk > Software Development > C#

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 03-12-2008
Junior Member
 
Join Date: Dec 2007
Location: India
Posts: 2
Thanks: 1
Thanked 3 Times in 1 Post
abhi.raj4u is on a distinguished road
Question Inhertinace

how many types of inheritance posible in c# using .net.
Reply With Quote
The Following 3 Users Say Thank You to abhi.raj4u For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 06-06-2008
Junior Member
 
Join Date: Jun 2008
Location: chennai
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
senkumar.net is on a distinguished road
Unhappy Re: Inhertinace

5 inhertinace

1. single
2. Mulitple
3. Multilevel
4. hybride
5. hierarical
Reply With Quote
  #3 (permalink)  
Old 06-07-2008
Junior Member
 
Join Date: Jun 2008
Location: Chennai
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
kingrashik is on a distinguished road
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
Reply With Quote
  #4 (permalink)  
Old 06-11-2008
Junior Member
 
Join Date: Apr 2008
Location: visakhaptnam
Posts: 18
Thanks: 2
Thanked 2 Times in 1 Post
ushalakshmi is on a distinguished road
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......
Reply With Quote
  #5 (permalink)  
Old 06-11-2008
Junior Member
 
Join Date: Jun 2008
Location: bangalore
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
mehalashankar is on a distinguished road
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
Reply With Quote
  #6 (permalink)  
Old 06-23-2008
Expert Member
 
Join Date: Dec 2007
Location: Pune
Posts: 139
Thanks: 0
Thanked 6 Times in 6 Posts
peeyush_jain is on a distinguished road
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
Reply With Quote
  #7 (permalink)  
Old 07-26-2008
Junior Member
 
Join Date: Jul 2007
Location: Banglore
Posts: 24
Thanks: 6
Thanked 4 Times in 3 Posts
sowji_mca is on a distinguished road
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.
Reply With Quote

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved