Net Interview Questions For Freshers

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

.

Net Interview Questions for Freshers:

1. What is ASP.NET?
ASP.Net is a web development platform provided by Microsoft. It is used
for creating web-based applications. ASP.Net applications can also be
written in a variety of .Net languages. These include C#, VB.Net, and J#.
The ASP stands for Active Server Pages, and .NET is Network Enabled
Technologies.

2. What is the difference between client-side and server-side validations in

WebPages?

The client-side validation happens at the client's side with the help of
JavaScript and VBScript. This validation has occurred before the Web page is
sent to the server.

The server-side validation happens at the server side.

3. What is the difference between globalization and localization?

Globalization: Globalization is a technique to identify the part of a Web


application that is different for different languages and separate it out from
the web application.

Localization: In localization, you try to configure a Web application so that it


can be supported for a specific language or locale.

4. What is the difference between early binding and late binding?

Early Binding: In early binding, a non-virtual method is called which is


decided at a compile time.

Late Binding: In late binding, a virtual method is called which is decided at


runtime.
5. What is MVC?

MVC stands for Model View Controller. It is a design pattern that is used to
separate business logic and presentation logic. It is used to develop the highly
customized application.

The Model represents data, View represents presentation and controller acts
as an interface between Model and View.

6. What is a cookie?

A Cookie is a small piece of information which is stored at the client side.


There are two types of cookie:

o Session/Temporary Cookie: valid for a single session


o Persistent Cookie: valid for multiple session

7. What is a delegate in .NET?

A delegate is a .NET object which defines a method signature and it can pass a
function as a parameter.
Delegate always points to a method that matches its specific signature. Users
can encapsulate the reference of a method in a delegate object.

When we pass the delegate object in a program, it will call the referenced
method. To create a custom event in a class, we can make use of delegate.

8. What is the difference between an abstract class and an interface?

The main difference between an abstract class and an interface are listed below:

Abstract Class Interface


Used to declare properties, events, methods, and Fields cannot be declared using
fields as well. interfaces.
Provides the partial implementation of functionalities Used to declare the behavior of
that must be implemented by inheriting classes. an implementing class.
Different kinds of access modifiers like private, Only public access modifier is
public, protected, etc. are supported. supported.
It does not contain static
It can contain static members. members.
Multiple inheritances are
Multiple inheritances cannot be achieved. achieved.

9. What are the types of memories supported in the .NET framework?

Two types of memories are present in .NET. They are:

Stack: Stack is a stored-value type that keeps track of each executing thread
and its location. It is used for static memory allocation.

Heap: Heap is a stored reference type that keeps track of the more precise
objects or data. It is used for dynamic memory allocation.

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

11. Explain different types of cookies available in ASP.NET?

Two types of cookies are available in ASP.NET. They are:

 Session Cookie: It resides on the client machine for a single session and is
valid until the user logs out.
 Persistent Cookie: It resides on the user machine for a period specified for its
expiry. It may be an hour, a day, a month, or never.

12. What are the different components of .NET?

Following are the components of .NET

 Common Language run-time


 Application Domain
 Common Type System
 .NET Class Library
 .NET Framework
 Profiling

13. Explain the difference between a class and an object?


Class Object
Class is the definition of an object An object is an instance of a class.
A class does not become an object
It is a template of the object
unless instantiated
It describes all the methods, An object is used to access all those
properties, etc properties from the class.

14. How do you prevent a class from being inherited?

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

15. What are the different types of constructors in c#?

Following are the types of constructors in C#:

 Default Constructor
 Parameterized constructor
 Copy Constructor
 Static Constructor
 Private Constructor

16. What are the different types of assemblies?

There are two types of assemblies:

 Private Assembly: It is accessible only to the application, it is installed in


the installation directory of the application.
 Shared Assembly: It can be shared by multiple applications, it is installed
in the GAC.

17. What are the basic features of OOP?


The basic features of OOP are:

 Encapsulation: Creation of self-contained modules that bind together the


data and the functions that access that data.
 Abstraction: Handles complexity and allows the implementation of further
complex logic without disclosing it to the user object.
 Polymorphism: Operation performed depends upon the context at runtime
to facilitate easy integration.
 Inheritance: Creation of classes in a hierarchy to enable a class to inherit
behavior from its parent class allowing reuse of code.

18. What is inheritance?

Inheritance is a method for creating hierarchies of objects wherein one class,


called a subclass, is based on another class, called a base class.

19. What is Polymorphism?

Polymorphism refers to one interface with multiple functions. It means that


the same method or property can perform different actions depending on
the run-time type of the instance that invokes it.

20. 34. What are the types of Polymorphism?

There are two types of Polymorphism:

i. Static or compile-time polymorphism

ii. Dynamic or runtime polymorphism

21. What are the functional and non-functional requirements?

Functional requirements are the basic and mandatory facilities that must be
incorporated into a system. Non-functional requirements are quality-related
attributes that the system must deliver.

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

23. 70. What are the fundamental objects in ADO.NET?

There are two fundamental objects in ADO.NET:

i. DataReader- connected architecture.

ii. DataSet- disconnected architecture.

24. What is Serialization?

Serialization is the process of converting the state of an object into a form (a


stream of bytes) to be persisted or transported. Deserialization converts a
stream into an object and is the opposite of serialization. These processes
allow data to be stored and transferred.

25. What is the difference between DLL and EXE?

.EXE files are single outbound files that cannot be shared with other
applications. DLL files are multiple inbound files that are shareable.

You might also like