Showing posts with label C-Sharp. Show all posts
Showing posts with label C-Sharp. Show all posts

Explain what is the top .NET class in c#?

System.Object.

Explain the Advantage of using System.Text.StringBuilder over string

StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it is being operated on, a new instance is created.

Does System.Array store multiple data types?

No.

Can C# support multiple inheritance?

No, use interfaces instead.

Can multiple catch blocks be executed?

No, once the proper catch code fires off, the control is transferred to the finally block (if there are any), and then whatever follows the finally block.

Can we override private virtual methods?

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

Explain What is an interface class in c#?

It is an abstract class with public abstract methods all of which must be implemented in the inherited classes.