Interview questions for .Net

This image has an empty alt attribute; its file name is index5-1.jpg

1. What is .Net framework?

It is a platform for building various applications on windows. It has a list of inbuilt functionalities in the form of class, library, and APIs which are used to build, deploy and run web services and different applications. It supports different languages such as C#, VB .Net, Cobol, Perl, etc.
This framework supports object-oriented programming model.

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 are the important components of .Net?

The components of .Net are Common language run-time, .Net Class library, Application domain, Common Type System, .Net framework, Profiling, etc. However, the two important components are Class library and Common Language Runtime.

4. How is it possible for .NET to support many languages?

The .NET language code is compiled to Microsoft Intermediate Language (MSIL). The generated code is called managed code. This managed code is run in .NET environment. So after compilation the language is not a barrier and the code can call or use function of another language also.

5. What is CTS?

CTS stand 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 is callable by an application that is developed using a different language.

6. How is it possible for .NET to support many languages?

The .NET language code is compiled to Microsoft Intermediate Language (MSIL). The generated code is called managed code. This managed code is run in .NET environment. So after compilation the language is not a barrier and the code can call or use function of another language also.

7. What is CLR?

CLR stands for Common Language Runtime. It is one of the most important components of .Net framework. It provides building blocks for many applications.
An application built using C# gets compiled by its own compiler and is converted into an Intermediate language. This is then targeted to CLR. CLR does various operations like memory management, Security checks, assemblies to be loaded and thread management. It provides a secure execution environment for applications.

8. What are differences between system string builder and system string?

The main differences between systems. String builder and system.String are:
• system.stringbuilder is a mutable while system.string is immutable.
• Append keyword is used in system.stringbuilder but not in system.string.

9. What is MSIL?

MSIL stands for Microsoft Intermediate Language.
MSIL provides instructions for calling methods, initializing and storing values, operations such as memory handling, exception handling and so on. All .Net codes are first compiled to IL.

10. What is the difference between int and int32?

There is no difference between int and int32. System. Int is an alias name for System.Int32 which is a .Net Class.

11. What is the difference between namespace and assembly?

An assembly is a physical grouping of logical units while namespace groups classes. A namespace can span multiple assemblies.

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

13. What is the difference between session object and application object?

The session object is used to maintain the session of each user.
For example: If a user enters into the application then he will get a session id. If he leaves from the application then the session id is deleted. If he again enters into the application, he will get a different session id. But in the case of application object the id is maintained for whole application.

14. What is inheritance?

Inheritance represents the relationship between two classes where one type derives functionality from a second type and then extends it by adding new methods, properties, events, fields and constants.
C# support two types of inheritance:
• Implementation inheritance
• Interface inheritance

15. Define Overriding?

Overriding is a concept where a method in a derived class uses the same name, return type, and arguments as a method in its base class. In other words, if the derived class contains its own implementation of the method rather than using the method in the base class, the process is called overriding.
16. What is the meaning of Immutable?

Immutable means once you create a thing, you cannot modify it.
For example: If you want give new value to old value then it will discard the old value and create new instance in memory to hold the new value.

17. Can you set the session out time manually?

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

18. What is an IL?

(IL) Intermediate Language is also known as MSIL is MicroSoft Intermediate Language or Common Language Runtime (CLR) . When we compile .Net applications, its complied to MSIL, which is not machine read language. Hence Common Language Runtime (CLR) with JustIn Time Complier (JIT) , converts this MSIL to native code (binary code) , which is machine language.

19. Can you set the session out time manually?

Yes. Session out time can be set manually in web.config.
• Data Column
• Data Row
• Constraint
• Data Relation

20. What is manifest in .NET Framework?

Manifest is used to store assembly metadata. It contains all the metadata which are necessary for following things.
o Version of assembly
o Security identity
o Scope of the assembly
o To resolve references to resources and classes

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

22. What is business logic?

It is the functionality which handles the exchange of information between database and a user interface.

23. What is a connection pool?

A connection pool is a ‘collection of connections’ which are shared between the clients requesting one. Once the connection is closed, it returns back to the pool. This allows the connections to be reused.

comment 1


leave your comment


Your email address will not be published. Required fields are marked *