Dot Net Interview Questions | Blog | | Sanddas Solutions

Dot Net Interview Questions

Posted by Sand Das

Source | Posted On November 25, 2021 at 05:45 PM | Like  0

Share with

There are given top frequently asked .Net interview questions and answers that has been asked in many companies. Let's see the list of top Dot Net interview questions.

1) What is .NET?

.NET is a framework for software development. It is just like other software development framework like (J2EE). It provides runtime capabilities and a rich set of pre-built functionality in the form of class library and API's. This .NET framework is an environment to build, deploy and run web services and other applications.

The .NET framework contains three main parts:

  • Common Language Runtime
  • Framework classes

2) How many languages are supported by .NET at present time?

When .NET was introduced first time, it supports many languages like VB.NET,C#,COBOL, and Perl etc. At present time it supports almost 44 languages.

3) How is it possible for .NET to support many languages?

The .NET language code is compiled to Microsoft Intermediate Language (MSIL). The generated code is called managed code. This managed code is run in .NET environment. So after compilation the language is not a barrier and the code can call or use function of another language also.

4) Is ASP.NET different from ASP? If yes, explain how?

Yes, ASP.NET is different from ASP. These are the main differences:

  • ASP.NET is developed by Microsoft to create dynamic web applications while ASP (Active Server Pages) is a Microsoft's server side technology use to create web pages.
  • ASP.NET is compiled while ASP is interpreted.
  • ASP uses the technology named ADO while ASP.NET uses ADO.NET.
  • ASP.NET is completely object oriented while ASP is partially object oriented.

5) What is the state management in ASP.NET?

State management is a technique that is used to manage a state of an object on different request. It is very important to manage state in any web application. There are two types of state management systems in ASP.NET.

  • Client side state management
  • Server side state management

6) What is the difference between trace and debug?

Debug class is used to debug builds while Trace is used for both debug and release builds.

7) What are differences between system.stringbuilder and system.string?

The main differences between system.stringbuilder and system.string are:

  • system.stringbuilder is a mutable while system.string is immutable.
  • Append keyword is used in system.stringbuilder but not in system.string.

8) What is the difference between int and int32?

There is no difference between int and int32. System. Int is an alias name for System.Int32 which is a .Net Class.

9) What is the difference between namespace and assembly?

An assembly is a physical grouping of logical units while namespace groups classes. A namespace can span multiple assemblies.

10) Explain the differences between value type and reference type.

Following are the main differences between value type and reference type:

  • Value type contain variable while reference type doesn't contain value directly in its memory.
  • In reference type, memory is allocated in managed heap and in value type memory allocated in stack.
  • Reference type ex-class value type-struct, enumeration

11) What is the difference between session object and application object?

The session object is used to maintain the session of each user.

For example: If a user enters into the application then he will get a session id. If he leaves from the application then the session id is deleted. If he again enters into the application, he will get a different session id.

But in the case of application object the id is maintained for whole application.

12) What are differences between function and stored procedure in .Net programming language?

The difference between function and stored procedure:

  • Function returns only one value but procedure can return one or more than one value.
  • Function can be used in select statements but procedure cannot be used.
  • Function has only input parameters while Procedure can have an input and output parameters.
  • Exceptions can be handled by try catch block in procedures but that is not possible in function.

13) How to retrieve user name in case of Window Authentication?


14) What is the difference between Hash table and Array list?

Hash table stores data in the form of value pair and name while Array list stores only values.

You need to pass name to access value from the Hash table while in Array, you need to pass index number to access value.

In Array, you can store only similar type of data type while in Hash table you can store different type of data types. ex. int, string etc

15) What is the meaning of Immutable?

Immutable means once you create a thing, you cannot modify it.

For example: If you want give new value to old value then it will discard the old value and create new instance in memory to hold the new value.

16) What are the advantages of using session?

The advantages of using session are:

  • A session stores user states and data to all over the application.
  • It is very easy to implement and we can store any kind of object.
  • It can store every user data separately.
  • Session is secure and transparent from user because session object is stored on the server.

17) What are the disadvantages of using session?

The disadvantages of using session are:

  • Performance overhead occurs in case of large number of users, because session data is stored in server memory.
  • Overhead involved in serializing and De-Serializing session Data. Because In case of StateServer and SQLServer session mode we need to serialize the object before store.

18) Can you set the session out time manually?

Yes. Session out time can be set manually in web.config.

19) Explain the boxing and unboxing concept in .Net?

Boxing: Boxing is a process of converting value type into reference type.

Unboxing: Unboxing is a process of converting reference type to value type.

20) Is it possible to change the index of primary key on table?

The .NET language code is compiled to Microsoft Intermediate Language (MSIL). The generated code is called managed code. This managed code is run in .NET environment. So after compilation the language is not a barrier and the code can call or use function of another language also.

21) How is it possible for .NET to support many languages?


22) What is HTTPhandler?

HttpHandler is a low level request and response API which is made to service incoming Http request. Every incoming Http request recieved by ASP.NET is ultimately processed by a instance of a class that implements HttpHandler.

Subscribe to Our News Letter