DotNet/FAQ

DotNet Interview Questions

  1. What is an EXE and a DLL?
  2. What is JIT?
  3. Explain the differences between value type and reference type.
  4. Explain Microsoft Intermediate Language
  5. Is ASP.NET different from ASP? If yes, explain how?
  6. Explain role-based security in .NET
  7. Explain the different types of assembly.
  8. What is the order of the events in a page life cycle?
  9. What is caching?
  10. What are security controls available on ASP.NET?
  11. What is the use of manifest in the .NET framework?
  12. What are MDI and SDI?
  13. What is .NET core?
  14. What is Dot NET Core used for?
  15. What are C# and F#?

Q1)What is an EXE and a DLL?

EXE and DLLs are assembly executable modules.

EXE is an executable file that runs the application for which it is designed. An EXE is produced when we build an application. Therefore the assemblies are loaded directly when we run an EXE. However, an EXE cannot be shared with the other applications.

Dynamic Link Library (DLL) is a library that consists of code that needs to be hidden. The code is encapsulated inside this library. An application can consist of many DLLs which can be shared with the other programs and applications.

Q2)What is JIT?

JIT stands for Just In Time. It is a compiler that converts the intermediate code into the native language during the execution

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

The main differences between value type and reference type are given below:

A Value Type holds the actual data directly within the memory location and a reference type contains a pointer which consists of the address of another memory location that holds the actual data.

Value type stores its contents on the stack memory and reference type stores its contents on the heap memory.

Assigning a value type variable to another variable will copy the value directly and assigning a reference variable to another doesn’t copy the value, instead, it creates a second copy of the reference.

Predefined data types, structures, enums are examples of value types. Classes, Objects, Arrays, Indexers, Interfaces, etc are examples of reference types

Q4)Explain Microsoft Intermediate Language

MSIL is the Microsoft Intermediate Language, which provides instructions for calling methods, memory handling, storing and initializing values, exception handling, and so on.

The instructions provided by MSIL are platform-independent and are generated by the language-specific compiler from the source code. JIT compiler compiles the MSIL into machine code based on the requirement.

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

Yes, ASP.NET and ASP(Active Server Pages) both are different. Let’s check How they are different from each other.

ASP.NET uses .NET languages such as C# and VB.NET, which are compiled to Microsoft Intermediate Language (MSIL). ASP uses VBScript. ASP code is interpreted during the execution.

ASP.NET which is developed by Microsoft is used to create dynamic web applications while ASP is Microsoft’s server-side technology used to create web pages.

ASP.NET is fully object-oriented but ASP is partially object-oriented.

ASP.NET has full XML Support for easy data exchange whereas ASP has no built-in support for XML.

ASP.NET uses the ADO.NET technology to connect and work with databases. ASP uses ADO technology.

Q6)Explain role-based security in .NET

Role-based security is used to implement security measures in .NET, based on the roles assigned to the users in the organization. In the organization, authorization of users is done based on their roles.

For example, windows have role-based access like administrators, users, and guests

Q7)Explain the different types of assembly.
Assemblies are classified into 2 types. They are:
Private Assembly:
It is accessible only to the application.
We need to copy this private assembly, separately in all application folders where we want to use that assembly. Without copying, we cannot access the private assembly.
It requires to be installed in the installation directory of the application.
Shared or Public Assembly:
It can be shared by multiple applications.
Public assembly does not require copying separately into all application folders. Only one copy of public assembly is required at the system level, we can use the same copy by multiple applications.
It is installed in the Global Assembly Cache(GAC)

Q8)What is the order of the events in a page life cycle?

There are eight events as given below that take place in an order to successfully render a page:

Page_PreInit

Page_Init

Page_InitComplete

Page_PreLoad

Page_Load

Page_LoadComplete

Page_PreRender

Render

Q9)What is caching?
Caching means storing the data temporarily in the memory so that the data can be easily accessed from the memory by an application instead of searching for it in the original location. It increases the speed and performance efficiency of an application.
There are three types of caching:
Page caching
Data caching
Fragment caching

Q10)What are security controls available on ASP.NET?

Following are the five security controls available on ASP.NET:

<asp: Login> Provides a login capability that enables the users to enter their credentials with ID and password fields.

<asp: LoginName> Used to display the user name who has logged-in.

<asp: LoginView> Provides a variety of views depending on the template that has been selected.

<asp: LoginStatus> Used to check whether the user is authenticated or not.

<asp: PasswordRecovery> Sends an email to a user while resetting the password

Q11)What is the use of manifest in the .NET framework?

Manifest stores the metadata of the assembly. It contains metadata which is required for many things as given below:

Assembly version information.

Scope checking of the assembly.

Reference validation to classes.

Security identification

Q12)What are MDI and SDI?

MDI (Multiple Document Interface): An MDI allows you to open multiple windows, it will have one parent window and as many child windows. The components are shared from the parent window like toolbar, menubar, etc.

SDI (Single Document Interface): SDI opens each document in a separate window. Each window has its own components like a toolbar, menubar, etc. Therefore it is not constrained to the parent window

Q13)What is .NET core?
.NET Core can be said as the newer version of the .NET Framework. It is a cost-free, general-purpose, open-source application development platform provided by Microsoft. It is a cross-platform framework because it runs on various operating systems such as Windows, Linux, and macOS. This Framework can be used to develop applications like mobile, web, IoT, machine learning, game, cloud, microservices, etc.
It consists of important features like a cross-platform, sharable library, etc., that are necessary for running a basic .NET Core application. The remaining features are supplied in the form of NuGet packages, that can be added to your application according to your needs. Like this we can say, the .NET Core will boost up the performance o…
Q14)What is Dot NET Core used for?
.NET Core is useful in the server application creations, that run on various operating systems like Windows, Mac, and Linux. Using this, developers can write libraries as well as applications in C#, F#, and VB.NET in both runtimes.
Generally, it is used for cloud applications or for modifying large enterprise applications into microservices.
.NET Core 3.0 supports cross-development between WPF, UWP, and Windows Forms.
.NET Core supports microservices, which permits cross-platform services to work with the .NET Core framework including services developed with .NET Framework, Ruby, Java, etc.
.NET Core’s features like lightweight, modularity, and flexibility make it easier to deploy .NET Core applications in containers. These containers can be deployed on any platform, Linux, cloud, and Windows.
Q15)What are C# and F#?
C# is a general-purpose and object-oriented programming language from Microsoft that runs on the .NET platform. It is designed for CLI(Common Language Infrastructure), which has executable code and a runtime environment that allows for the usage of different high-level languages on various computer platforms and architectures. It is mainly used for developing web applications, desktop applications, mobile applications, database applications, games, etc.
F# is an open-source, functional-first, object-oriented and, cross-platform programming language that runs on a .NET platform and is used for writing robust, succinct, and performant code. We can say that F# is data-oriented because here code involves transforming data with functions. It is mainly used in making scientific models, artificial intelligence research work, mathematical problem solving, financial modelling, GUI games, CPU design, compiler programming, etc.
Open chat
Hello
Can we help you?