top 200+ .Net Interview Questions for 2 years experience

Net Interview Questions for 2 years experience

There are given top frequently asked .Net interview questions and answers that has been asked in many companies. Let’s see the list of .Net Interview Questions for 2 years experience.

.Net Interview Questions for 2 years experience

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
  • ASP.NET

How does the .NET framework work?

Net Interview Questions for 2 years experience

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) What is CTS?

Answer: CTS stands for Common Type System. It has a set of rules which state how a data type should be declared, defined and used in the program. It describes the data types that are to be used in the application.

We can design our own classes and values by following the rules that are present in the CTS. The rules are made so that the data type declared using a programming language can be called by an application that is developed using a different language.

4)What is an application server?

As defined in Wikipedia, an application server is a software engine that delivers applications to client computers or devices. The application server runs your server code. Some well known application servers are IIS (Microsoft), WebLogic Server (BEA), JBoss (Red Hat), WebSphere (IBM).

5) 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.

6)Can you use multiple inheritance in .NET?

.NET supports only single inheritance. However the purpose is accomplished using multiple interfaces.

Also Read:

7) 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.

8) 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.

9) What are EXE and DLL?

EXE is an executable file that works as an application and it runs individually as it contains an entry point. DLL is a Dynamic Link Library which is a supportive file to other applications, and it cannot run individually.

10) What is the difference between managed and unmanaged code?

Managed codeUnmanaged code
Managed code is managed by CLRAny code that is not managed by CLR
.NET framework is necessary to execute managed codeIndependent of .NET framework
CLR manages memory management through garbage collectionOwn runtime environment for compilation and execution

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

System.Environment.UserName

12) If you want to replace multiple if-else statements in code, which statement will you use?

In Visual basic, we can use Select-Case statement to replace multiple If-Else statement. In C#, we should use Switch-Case statement to replace multiple If-Else statement.

13) What is the difference between custom and user control?

Custom ControlUser Control
Derives from controlDerives from UserControl
Dynamic LayoutStatic Layout
Defines a single controlDefines a set of con
It has full toolbox supportCannot be added to the toolbox
Loosely coupled controlTightly coupled control

14) Which are the new features added in .NET framework 4.0?

A list of new features of .NET Framework 4.0:

  • Improved Application Compatibility and Deployment Support
  • Dynamic Language Runtime
  • Managed Extensibility Framework
  • Parallel Programming framework
  • Improved Security Model
  • Networking Improvements
  • Improved Core ASP.NET Services
  • Improvements in WPF 4
  • Improved Entity Framework (EF)
  • Integration between WCF and WF

15) Which adapter should be used to get the data from an Access database?

OleDbDataAdapter is used to get the data from an Access database.

16) 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.

17) How to manage pagination in a page?

Using pagination option in DataGrid control. We have to set the number of records for a page, then it takes care of pagination by itself.

18)What are the consideration in deciding to use .NET Remoting or ASP.NET Web Services?

Remoting is a more efficient communication exchange when you can control both ends of the application involved in the communication process. Web Services provide an open-protocol-based exchange of information. Web Services are best when you need to communicate with an external organization or another (non-.NET) technology.

19) Which properties are used to bind a DataGridView control?

The DataSource property and the DataMember property are used to bind a DataGridView control.

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

No.

21) Can you set the session out time manually?

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

22) What is Caching?

Answer: Caching means storing data temporarily in the memory so that the application can access the data from the cache instead of looking for its original location. This increases the performance of the application and its speed. System.Runtime.Caching namespace is used for Caching information in .Net.

Given below are the 3 different types of Caching:

  • Page Caching
  • Data Caching
  • Fragment Caching

This article mainly concentrates on the framework concepts of .Net and .NET Core. We are sure that it would give you sufficient information and a fair knowledge of the common questions that will be asked during an interview.

Leave a Comment

Your email address will not be published.