C# OOPS Interview Questions and Answers for Experienced - 2

Question: 6

What is method overloading?

Method overloading is having methods with same name but carrying different signature, this is useful when you want a method to behave differently depending upon a data passed to it.

Question: 7

What is a static class?

When a class has been defined as static, it is not creatable using the new keyword, and it can contain only static members or fields.

Question: 8

What is static member?

The member defined as static which can be invoked directly from the class level, rather than from its instance.

Question: 9

What is static function/method?

Static methods need not need to create an instance of the class containing it and can be accessed directly from class level.

Question: 10

What is the difference between System.String and System.StringBuilder classes?

String is immutable; System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.

Related Questions