Top.NET Interview Questions In 2024

By | December 1, 2023

.net interview questions

The .NET interview questions: Microsoft developed.NET to help developers build, deploy and run various applications based on .NET technologies. It is one of the most popular frameworks used by developers worldwide. The applications developed by the .NET technologies can run on various platforms. In this article, we will cover some important interview questions related to the .NET framework.

Top .NET Interview Questions

Q1. What is .NET Framework?

Ans: The .NET framework is a software framework developed by Microsoft. It provides a programming environment for building, deploying, and running various applications on Windows systems. It supports many programming languages like C#, Visual Basics, F# and more. The applications made by .NET technologies can run on many platforms.

Q2. What are the different components used in the.NET framework?

Ans: Some components used in the .NET framework are:

  • Common language run time
  • .NET class library
  • .NET framework
  • Common type system
  • Application domain
  • Profiling

Q3. . What does JIT stand for?

Ans: JIT is a .NET framework compiler that stands for Just In Time. It is used to translate the intermediate code into the original language while it is being executed.

Q4. What is the difference between a Class and an object?

Ans: Check the difference below between a class and an object.

Difference Between Class and Object
Class Object
It is a definition or blueprint of the object Objects are instances of a class.
It covers methods and properties  It is used to access the properties of the class.
It provides templates. It is created based on the class.

Q5. What does MSIL stand for?

Ans: MSIL stands for Microsoft Intermediate Language. It serves as a source of instructions needed for various operations, including handling exceptions and memory. It can also give instructions on how to initialise and store methods and values quickly.

An essential concept is involved in the next.NET interview question.

Q6. What Is CTS?

Ans: The Common Type System, or CTS for short, is a predefined set of systematic rules that specify how data types should be defined in relation to the values that users supply. Its main goal is to define and include every type of data that is used in an application by a user.

Q7: What do you mean by CLS?

Ans: Common language specification helps the developers use the components that are inter-language compatible with certain rules that come with CLS. It then helps in reusing the code in other .NET compatible languages.

Q8. What is the difference between boxing and unboxing?

Ans: Difference Between Boxing and Unboxing

Difference Between Boxing and Unboxing
Boxing  Unboxing
It converts a value type to a type object. It is used for extracting the value type from the object.
It is implicit  It is explicit.

Q9. What are some important versions of the .NET Framework?

Ans: Some important versions of the .NET framework are mentioned in the table below.

.NET Framework
Version  .NET Framework  Visual Studio
C# 1.0 .NET Framework 1.0/1.1 Visual Studio .NET 2002
C# 2.0 .NET Framework 2.0 Visual Studio 2005
C# 3.0 .NET Framework 3.0/3.5 Visual Studio 2008
C# 4.0 .NET Framework 4.0 Visual Studio 2010
C# 5.0 .NET Framework 4.5 Visual Studio 2012/2013
C# 6.0 .NET Framework 4.6 Visual Studio 2013/2015
C# 7.0 .NET CORE Visual Studio 2017

Q10. What is the difference between managed and unmanaged code?

Ans: The major difference between managed and unmanaged code is given in the table.

.NET Interview Questions
Managed Code Unmanaged Code
Managed by CLR Not managed by any entity
Garbage collection is used to manage memory Runtime environment takes care of the management
The .NET framework is necessary for the execution Not dependant on the .NET framework to run

Q11. How many types of state management in .NET?

Ans: Two categories of state management are given below.

  • Client-side: It is primarily composed of simple, reusable objects and is used to store information on the client’s computer.
  • Server-side: It saves data locally on the server and facilitates its management and preservation.

Q12. What are some components of an assembly in .NET?

Ans: There are four major components used in .NET:

  • Resource
  • MSIL
  • Metadata
  • Manifest

Q13. What are the different constructors present in the .NET Framework?

Ans: There are five major constructors present in the .NET Framework.

  • Copy constructor
  • Parameterized constructor
  • Default constructor
  • Private constructor
  • Static constructor

Q14. Is it possible to set a manual timeout for .NET?

Ans: Yes, it can easily be done by manipulating the web.config file.

Q15. Define caching and its different types.

Ans: The term “caching” refers to the process of temporarily putting data in memory so that it can be accessed there rather than at its original location. The different types of caching are:

  • Data caching 
  • Page caching
  • Fragment caching

Q16. What is the full form of MVC?

Ans: The full form of MVC is Model View Controller. It is used to build .NET applications.

Q17. Define MIME.

Ans: MIME stands for Multipurpose Internet Mail Extensions. It is used to exchange files over the Internet.

Q18. What are the different types of assemblies available in the .NET framework?

Ans: Two types of assemblies are available in the .NET framework:

  • Private Assembly: It is installed within the application’s directory and is only available to the application itself.
  • Shared Assembly: This is a file that is placed in the GAC and that various apps can share.

Q19. What is a garbage collector in the .NET Framework?

Ans: The garbage collector is used to free up the unused code in the memory.

.NET Interview Questions
Generation 0 It stores short lived objects.
Generation 1  This stores medium lived objects 
Generation 2 It stores long lived objects.

Q-20: Explain localization and globalisation.

Ans: The difference between localization and globalisation is given in the table below.

.NET Interview Questions
Localization Globalisation
It means changing the already globalised application to cater to a specific language or culture. Globalisation is the process of developing applications to support multiple languages.
Microsoft.Extensions.Localization is used to localise the application content. Existing applications can also be converted to support multiple languages.
Telegram Group Join Now
WhatsApp Channel Join Now
YouTube Channel Subscribe
Scroll to Top
close
counselling
Want to Enrol in PW Skills Courses
Connect with our experts to get a free counselling & get all your doubt cleared.