.NET interview questions

.NET is an innovative software development tool from Microsoft. This has got various advantages that any other software does not have. For .NET interview questions begin preparing right from the basics. Conceptual questions and technical questions are mostly expected. Microsoft's .NET is widely used in different web application development companies. It has made things easy interview question for developing large programs, decoding them and turning them into popular applications. There are a lot of opportunities for .NET specialists and analysts. It is a wise career choice to become a part of a .NET expert in companies that prefer that framework.

The .NET interview questions may be asked from anywhere because it is a vast subject. Differences, uses, reasoning, coding and quantitative questions are asked to make these interviews tricky. The right facts must be quoted in the right place to answer .NET interview questions. Also, short and quick answers are mostly preferred. Preparing for an interview is easier when example questions and answers are used for reference.

So here are some of the very common .NET interview questions asked with suitable answers. This will be a great tool in getting ready for .NET interviews.

#1 Explain code access security.

Code Access Security prevents the .NET programs from unauthorized input. It specifically stops the execution or stops the code to perform certain activities when unauthorized people try to access. CAS is hence the security mode of the .NET framework.

#2 What is MISL?

MISL is Microsoft Intermediate Language. It is the intermediate language for .NET applications. When a developer writes codes on .NET they are compiled to this language which is not a machine language. That is why we use JIT compilers to translate this into a machine-readable language.

#3 What is a .NET class?

.NET class defines the kind of data or functionality the object will possess. Classes can customize types according to our wish while grouping the other variables, methods or events.

#4 What is boxing and un-boxing in .NET?

Boxing is used for converting a value type into a reference type and un-boxing is used to convert a reference type to a value type.

#5 What are the different types of memory in .NET?

There are two types of memory in .NET which are heap and stack memory. Heap memory is used for dynamic allocation of memory. When a program is created, heap memory space only stores them. Stack memory is more sequential and is used for static memory storage. Therefore it is easy to access this part of memory quickly. The reference to the codes stored by heap memory is stored in the stack and is used during execution.

#6 State some of the different languages supported by .NET?

There are various languages supported by .NET because of MISL facility. They include Visual Basic, C, C++, Python, F#, C#, JavaScript, HTML and more.

Also, tell about the languages that you have practised previously.

Also Prepare: Frequently Asked LINQ interview questions

#7 What does JIT compilation do in .NET?

JIT compilation in .NET is used to execute MISL on the target device. CLR translates, while JIT loads it on the computer. The MISL is stored in .NET assembly when the developer writes codes in .NET language. The JIT compilation only derives or translates the MISL code and then utilizes CPU architecture for execution. JIT also ensures that every written code fits in the given memory space. JIT is responsible to execute the written code according to the native code of the target device. Additionally, JIT stores the code in the native language for further use.

#8 Is .NET an Object Oriented language? What are their components?

Yes, .NET is an Object Oriented language. This allows us to access inheritance, abstraction, encapsulation, and polymorphism. These components are useful in creating more complex codes in an organized manner. It allows us to modify the existing codes too.

#9 What is assembly in .NET?

Assembly is a code library that is partially compiled. It is used for grouping many logical units together. We can use this for deployment and for improving security. One assembly can contain one or many code files. This is because, in .NET, different languages can be used to create one code file. There are two types of assemblies, process, and library assembly. Generally, the .NET assembly contains codes in CIL language which is then compiled by CLR and JIT to machine language.

#10 What is .NET?

.NET is a software development framework by Microsoft. This contains 3 main components including Common Language Runtime, Framework classes, and ASP.NET. These components provide excellent runtime and inbuilt functionalities in form of class libraries. Other components are metadata and self-description components, dynamic language runtime and more.

#11 What is a manifest?

A manifest in .NET is used to store assembly metadata. These metadata are used for version assemble, the scope of assembling, security and for segregating references to classes.

#12 What is connection pooling?

Connection pooling is used for maintaining database connections that can be reused in the future. There are a few requirements for executing connection pooling. Firstly, there should be multiple processing for sharing the same connection. They must have similar processing and security requirements. The string used for connection should be the same.

Also Prepare: Frequently Asked LINQ interview questions

#13 How is .NET able to support a lot of languages?

.NET is equipped with Microsoft Intermediate Language (MISL) that has got codes compiled within itself. These codes are called managed codes that run exclusively on the .NET environment. When these codes are compiled, then language is no restriction. So .NET can support about 30-40 languages without hindrance.

#14 What is the use of Common Language Runtime?

In .NET, all source codes get converted into a common language which is the MISL. For executing this, the CLR is used. It is also used for code verification, security for code access, collection of garbage and for JIT compilation. It is the common runtime environment for most .NET codes. In CLR, codes are expressed in form of a byte-code called Common Intermediate Language.

#15 What is garbage collection?

Garbage collection is an important feature of .NET. It is used to prevent major memory leaks in an application. It constantly checks the application and makes free spaces wherever possible.

Ask a Question