C# Classes and Objects Programming Interview Questions - 2

Question: 6

Explain about this reference?

The keyword this is used as a reference of a current class. The mechanism of accessing the current object is obtained is using this reference.

Question: 7

What are the features of the constructor?

The constructor may be static or non static.

The name of the constructor is the class name itself.

The constructor does not return any value and hence does not have a return type.

The formal parameters define the signature of the constructor.

Question: 8

What are the features of destructor?

The name of the destructor is same as the class name.

The name is preceded by ~ (tilde).

Destructors always public.

There are no Parameters in the signature.

There is no return Type in the destructor.

Question: 9

What are the Restrictions of Static Methods?

Static methods can only call other static methods.

Static methods can only access static data.

Static methods can not refer to this or base in any way.

Related Questions
Recent Articles
Trending Posts

REGISTER TO GET FREE UPDATES