ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  Dot Net  >>  Dot Net AllOther
 
 


 

 
 Dot Net Framework interview questions  Dot Net Framework Interview Questions
 Dot Net Remoting interview questions  Dot Net Remoting Interview Questions
 Dot Net WindowsForms interview questions  Dot Net WindowsForms Interview Questions
 Dot Net General interview questions  Dot Net General Interview Questions
 Dot Net AllOther interview questions  Dot Net AllOther Interview Questions
Question
how do u achieve multilevel inheritance in .NET ?
 Question Submitted By :: Wilbur J. Pereira
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how do u achieve multilevel inheritance in .NET ?
Answer
# 1
by uing interfaces we can implement multiple inheritance
 
Is This Answer Correct ?    9 Yes 3 No
Guest
 
  Re: how do u achieve multilevel inheritance in .NET ?
Answer
# 2
IN .NET  NotProviding the Multiple Inheritance but we 
achive this using interface concept.
 
Is This Answer Correct ?    6 Yes 2 No
Maddy
 
 
 
  Re: how do u achieve multilevel inheritance in .NET ?
Answer
# 3
learn the concept interface first and u can implement 
multilevel inheritence automatically.
 
Is This Answer Correct ?    0 Yes 5 No
Naren
 
  Re: how do u achieve multilevel inheritance in .NET ?
Answer
# 4
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 ?    9 Yes 1 No
Jobin
 
  Re: how do u achieve multilevel inheritance in .NET ?
Answer
# 5
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 ?    4 Yes 0 No
Raju
 
  Re: how do u achieve multilevel inheritance in .NET ?
Answer
# 6
.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 ?    0 Yes 0 No
Venkat
 

 
 
 
Other Dot Net AllOther Interview Questions
 
  Question Asked @ Answers
 
Please tell me the .net 2.5 frame work with example  2
i want to know that now a days which software course has demand and more opportunities please give me reply to my mail id APC3
Difference between abstract class and interface HCL31
how to display a message box in the Application? Six-Sigma2
how to find the 2nd higgest salary in the column for example take table name is employee? And also find bottom 2nd lowest salary ? GeoTechnology6
How can i create only one instance of class and thus doesn't allow creating any more instances?  1
What is a Windows Service and how does its lifecycle differ from a "standard" EXE?  1
what is stage management ? (ASP.NET) Ness-Technologies3
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. Honeywell2
Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?  1
what is ado.net HCL6
Will finally block exec if we write an return statement to a try block???????  2
How can a win service developed in .NET be installed or used in Win98?  1
how can u manage sessions ? Ness-Technologies2
what is the need of vss to developer?  1
What is ITIL? What is the use of ITIL and how it works? IBM1
while developing a asp.net 2.0 ajax application how to maitain and check the ACID property for each transaction Aviva2
Can you explain the difference between an ADO.NET Dataset and ADO Recordset?  1
what is the difference between value types and reference types? Six-Sigma2
what is a required field validation control? Six-Sigma2
 
For more Dot Net AllOther Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com