Top 200+ Advanced C# Interview Questions 2019-2020 - 1

Question: 1

What are delegates?

A delegates is a class derived from System.Delegate.

However the language has a special syntax for declaring delegates which means that they don’t like classes.

A delegate represent a method with a particular signature.

An instance of a delegate represents a method with a particular signature on a particular object (or class in the case of a static method).

Question: 2

Does C# support multiple inheritance?

C# supports multiple inheritance of interfaces, but not of classes.

Question: 3

What are sealed classes in C#?

The sealed modifier is used to prevent derivation from a class. A compile time error occurs if a sealed class is specified as the base class of another class.

(A sealed class cannot also be an abstract class).

Question: 4

What is an abstract class?

A class that cannot be instantiated.

An abstract class is a class that must be inherited and have the methods overridden.

An abstract class is essentially a blueprint for a class without any implementation.

Question: 5

What are all the different levels of scoping?

Block Level – Variables declared within an If… Then, For … Next, Do… Loop block.

Procedure Level – Variables declared within the procedures.

Module Level – Variables declared outside of a procedure.

Namespace Level – Variables declared outside of a procedure, but given public accessibility (Public or Friend).

Related Questions