Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how do u achieve multilevel inheritance in .NET ?

Answers were Sorted based on User's Feedback



how do u achieve multilevel inheritance in .NET ?..

Answer / guest

by uing interfaces we can implement multiple inheritance

Is This Answer Correct ?    38 Yes 9 No

how do u achieve multilevel inheritance in .NET ?..

Answer / jobin

Hey the question is abt multilevel inheritence not multiple.

in multi level
clas B can inherit A
class C can inherit B like that....

Is This Answer Correct ?    28 Yes 3 No

how do u achieve multilevel inheritance in .NET ?..

Answer / maddy

IN .NET NotProviding the Multiple Inheritance but we
achive this using interface concept.

Is This Answer Correct ?    28 Yes 8 No

how do u achieve multilevel inheritance in .NET ?..

Answer / raju

C# doesn't support multiple inheritence but multilevel
inheritence is allow here(or by using Abstract classes).So
now u can use the Interface Concepts.Taking an example of
how u can inplement that.

//Abstract class of Animal is define here..
abstract class Animal
{
public void Eat()
{
}
}
//Abstract class of Vechicle is define here..
abstract class Vechicle
{
public void Eat()
{
}
}
//Implementing Interface....
Interface Flyer
{
void Fly();
}


class Aeroplane:Vehicle,Flyer
{
}

class Bird:Animal,Flyer
{
}



As you can see, the two sub classes Bird and Aeroplane
derive from the Animal and Vehicle classes respectively.
Both have the characteristics of their respective base
classes. The Bird like any other animal, eats while the
Aeroplane being a vehicle, runs. However, they both share a
common trait - the ability to fly. This ability is neither
possessed by all animals nor by all vehicles. So it cannot
be defined in either of the base classes. Again, it is not
only possessed by the Aeroplane and Bird, some insects,
baloons and other types of vehicles such as the Helicopter
also possess it. It wouldn’t be effective to define this
ability in each of them. Actually, it will be defined
individually in each of these classes because each have
their own way of flying, the bird flaps the wings, whereas
the helicopter roatates its through a mechanical engine.
However, this ability is declared in the Flyer interface so
that any class which implements this interface would have
to define the Fly() method by overriding it.

Is This Answer Correct ?    15 Yes 4 No

how do u achieve multilevel inheritance in .NET ?..

Answer / gopal

Creating a new class from an existing class is known as
inheritence.
Multilevel inheritence:
Creating a new class from already Derived Class is
known as Multilevel Inheritence.

Is This Answer Correct ?    9 Yes 1 No

how do u achieve multilevel inheritance in .NET ?..

Answer / venkat

.Net Frame work does not support Mltiple inheritance but it
supports Multiple Interface inheritance.Because one class
can derive from only one base class but from multile
interfaces

Is This Answer Correct ?    7 Yes 5 No

how do u achieve multilevel inheritance in .NET ?..

Answer / sandeep

Public Class ml1
Sub ml11()
MsgBox("hi")
End Sub
End Class
Public Class ml2
Inherits ml1
Sub ml22()
MsgBox("san")
End Sub
End Class
Public Class ml3
Inherits ml2
End Class


This ll give u msg
Hi
San
by inheriting methods from both the classes

Is This Answer Correct ?    3 Yes 4 No

how do u achieve multilevel inheritance in .NET ?..

Answer / vital

using interfaces only.

Is This Answer Correct ?    4 Yes 8 No

how do u achieve multilevel inheritance in .NET ?..

Answer / naren

learn the concept interface first and u can implement
multilevel inheritence automatically.

Is This Answer Correct ?    6 Yes 15 No

Post New Answer

More Dot Net AllOther Interview Questions

What are .net mobile controls features? : Microsoft dot net mobile

0 Answers  


Xmlserializer is throwing a generic "there was an error reflecting myclass" error. How do I find out what the problem is?

0 Answers  


What are the five stages in a dlx pipeline? : Dot net architecture

0 Answers  


hi, kindly send WWF(.net 3.5) pdf notes to my id. thanx in advance, chays

0 Answers  


What re interop services?

0 Answers  


which of the following statement is true about gac. a)it is being handled by .net framwork b)It is special folder c)it can have files with same name etc etc.

4 Answers   Honeywell,


What are the important principles of soa (service oriented architecture)?

0 Answers  


I can't be bothered with cas. Can I turn it off?

0 Answers  


IN C# if we click a field in the dropdownlist then i have to get the respected field details in the next textbox..........

2 Answers  


what is Difference beetween Array and Hash Table.?

8 Answers   Patni,


Explain dma? : .NET Architecture

0 Answers  


What is a sealed Class? What is the differnce between sealed class and private class?

2 Answers   iGate,


Categories