answersLogoWhite

0

jkh

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is the top NET class that everything is derived from?

It is System.Object class.


What is the topNet class that everything is derived from in c?

C language: int (but C is NOT a .net language) C# language: object or System.Object


Does the derived class take the memory of base class in inheritance?

Yes, the derived class includes the memory of the base class. The derived class inherits everything in the base class, data and function, and provides additional data and function as needed.


Can a derived class call the static constructor of a base class in .Net?

No. not directly. The static constructor is called by .net framework, not by your code. I always treat static constructor is the class initializer (not the instance one). The initialization routine is only called when the class definition being loaded. When the derived class is loaded, since this class derived from the base, it makes to go up the chain (of the hierarchy) to call those static constuctors. So, when a derived class is loaded, the static constructors of the hierarchy is called up. (any one of them had been loaded, the calling sequence stops). You cannot call those static constructor directly, nor you can skip "not to execute" them.


Give an example of constructor and destructor in derived class?

class superclass { public: superclass() {... } // c'tor public: virtual ~superclass() {... } // d'tor }; // superclass class derived: public superclass { public: derived() : superclass() { ... } // derived c'tor public: virtual ~derived() {... } // derived d'tor }; // derived class


Can a derived class make a public base function private true or false?

True. A derived class can make a public base function private. The derived function is private, within the derived class, but public in other contexts.


What is a super class in terms of object oriented programming?

A superclass, also referred to as a parent class, is a class what which other classes are derived from. These derived classes are known as either subclasses or child classes.


When a derived class object is deleted which gets deleted first - the base class object or the derived class object?

When there is no further use of derived class obect in execution sequence then It gets deleted. calling of distructor sequence is reverse of constructor calling sequence ,so first derived class obect deleted than base class obect.


Which base class member functions are not inherited by a derived class?

Derived classes only inherit the protected and public members of their base classes. Private member functions cannot be inherited by a derived class.


What is multilevel inheritance in C plus plus?

Multi-level inheritance involves at least 3 classes, a, b and c, such that a is derived from b, and b is derived from c. c is therefore the least-derived base class, b is an intermediate base class and a is the most-derived class.


Can a c plus plus class be derived from a Java class?

No.


Is it true that a derived class inherits all the members of its base class?

False. A derived class inherits the public and protected members of its base class. Private members of the base class cannot be inherited.