C# Basic Interview Questions

What is Code Refactoring?

Code Refactoring is a simple process of restructuring your existing code to improve readability and reduce the code complexity.

What is WinRT?

WinRT is knowns as Windows Runtime.  WinRT is similar to CLR (Common Language Runtime).  The only difference between CLR and WinRT is that WinRT is used for the execuation of .NET application in Windows 8 platform.  Any application created under Windows 8 platform will make use of WinRT for execution.  You can run all .NET applications, which make use of CLR for execution under Windows 8 platform due to its backward compatibility nature.

 What do you mean by case-sensitive language?

In any language, there is a standard way of coding.  Few languages are case-sensitive, but few are not.   Due to case-sensitive nature of C#, Console.WriteLine and Console.writeLine function are not the same.  So if you ignore the case and try to compile the program, you will receive compile time error.

What is the use of Main() method in C# program?

The Main() method is know as the entry point of your program and the class which contains Main() method is also known as application object.  This method is responsible for the execution of your program.  Every C# program must have Main() method for its execution.

What are object level and class level members?

All the class members, which are accessible at the class level know as class level members.  To create those members, you have to make use of static keyword followed by access modifier.  Object level members are only accessible when you create an instance of that class, otherwise you can’t access them.