DotNet Interview Questions
- What is an EXE and a DLL?
- What is JIT?
- Explain the differences between value type and reference type.
- Explain Microsoft Intermediate Language
- Is ASP.NET different from ASP? If yes, explain how?
- Explain role-based security in .NET
- Explain the different types of assembly.
- What is the order of the events in a page life cycle?
- What is caching?
- What are security controls available on ASP.NET?
- What is the use of manifest in the .NET framework?
- What are MDI and SDI?
- What is .NET core?
- What is Dot NET Core used for?
- 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
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
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