crackyourinterview.com


To improves our performance please Like Share Subscribe(Will boost us)

A three level Class Hierarchy example with systax?
Question Posted on 18 Feb 2021Home >> DotNet >> C# >> A three level Class Hierarchy example with systax?

A three level Class Hierarchy example with systax?
Below is the example of three level Class Hierarchy example where we have 3 class as define below and some dervied class

public class A
 {

 }
public class B: A
 {

 }
public class C: B
 {

 }


Notes:-
(1)Here in above example A is a base class for B and B is base class for C.
(2)Derived class always have something more than a base class so base is smaller than the derived class.
(3)Below Facts
A objA1=new A(); (Correct)
A objA2=new B(); (Correct)
A objA3=new C(); (Correct)
B objA4=new C(); (Correct)
B objA5=new A(); (Incorrect)
(4)As in above class initialization a base class can hold a derived class but a derived class cannot hold a base class.
0
0



.


Most Visited Questions:-

Deep Learning Questions Answers
Below are the different Deep Leaning Questions and answer a More...

Continuous Integration Questions Answers
Below are the 20 odd questions for CI or Continuous Integra More...

Derived relationships in Association Rule Mining are represented in the form of __________.
Derived relationships in Association Rule Mining are repres More...

What is Gulpjs and some multiple choice questions on Gulp
Gulpjs is an open source whihc helps in building Javascript More...

Microservices Architecture Questions Answers
Below are the different questions on Microservices Architec More...




Other Important Questions

Simplest definition of partial classes and its rules?

Definition of Tuple class with some examples?

Define Race Condition in cSharp?

C#.Net Reserve Words

can we inherit private class level variables in c#






@2014-2022 Crackyourinterview (All rights reserved)
Privacy Policy - Disclaimer - Sitemap