Dot Net Interview Questions – Set 20

What is the state management in ASP.NET?

State management is a technique that is used to manage a state of an object on different request. It is very important to manage state in any web application. There are two types of state management systems in ASP.NET.

  • Client side state management
  • Server side state management

What is ADO?

ADO stands for ActiveX Data Objects. It is an application program for writing Windows applications. It is used to get access to a relational or non-relational database from database providers such as Microsoft and others.

What is the .NET framework?

The .NET framework supports an object-oriented approach that is used for building applications on windows. It supports various languages like C#, VB, Cobol, Perl, .NET, etc. It has a wide variety of tools and functionalities like class, library and APIs that are used to build, deploy and run web services and different applications.

What is cross-page posting?

Whenever we click on a submit button on a page, the data is stored on the same page. But if the data is stored on a different page, it is known as a cross-page posting.

Cross-page posting can be achieved by POSTBACKURL property which causes the postback.

FindControl method can be used to get the values that are posted on this page to which the page has been posted.

What is the difference between Stack and Queue?

The values in a stack are processed following the LIFO (Last-In, First-Out) principle, so all elements are inserted and deleted from the top end. But a queue lists items on a FIFO (First-In, First-Out) basis in terms of both insertion and deletion. The elements are inserted from the rear end in a queue and deleted from the front end.

Explain the Code Access Security (CAS) in .NET framework.

.NET security model is used to prevent unauthorized access of resources and operations and also restrict the codes to perform particular tasks. Code Access Security is a part of that .NET security.

How do you prevent a class from being inherited?

In C#, we can use the sealed keyword to prevent a class from being inherited.

Explain OOP and its relation to the .NET Framework?

OOP is the acronym for Object-Oriented Programming. It is a programming structure that uses self- contained entities called ‘objects’ instead of methods to achieve the desired functionality. OOP allows .NET developers to create modular programs and classes containing methods, properties, fields, events, and other logical modules.

What is the difference between shadowing and overriding?

Shadowing is used to provide a new implementation for the base class method and helps protect against subsequent base class modification. Overriding allows you to rewrite a base class function with a different definition and achieve polymorphism.

Differentiate between a Debug build and Release build?

Debug builds do not optimize and allow accurate setting of breakpoints. They contain debugging symbols, but the code built-in “Release” mode is optimized for speed or size without any debug data.