C# Interview Questions and Answers for Experienced - 4

Question: 16

Can you override private virtual machine?

No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access.

Question: 17

What are the method parameter in C#?

C# is having four parameter types which are

Value Parameter default parameter type. Only Input

Reference (ref) Parameter.

Input/Output

Output(out) Parameter

Parameter(params) Arrays

Question: 18

Is string is value type or reference type in c#?

String is an object (Reference Type)

Question: 19

What is the difference between system.string and system.stringbuilder classes?

System.string is immutable.

System.stringbuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.

Question: 20

What does the term immutable mean?

The data value may not be changed.

The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory.

Related Questions