Breaking News

.Net Interview Questions

1.What is .NET?

NET is an integral part of many applications running on Windows and provides common functionality for those applications to run. This download is for people who need .NET to run an application on their computer. For developers, the .NET Framework provides a comprehensive and consistent programming model for building applications that have visually stunning user experiences and seamless and secure communication.

 

2.How many languages .NET is supporting now?

When .NET was introduced it came with several languages.
VB.NET,
C#,
COBOL
and
Perl, etc.

 

3. What is an IL?

Intermediate Language is also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code is compiled to IL. IL is then converted to machine code at the point where the software is installed, or at run-time by a Just-In-Time (JIT) compiler.

 

4. What is code access security (CAS)?

Code access security (CAS) is part of the .NET security model that prevents unauthorized access of resources and operations, and restricts the code to perform particular tasks.

 

5. What is Difference between NameSpace and Assembly?

Assembly is physical grouping of logical units, Namespace, logically groups classes.
Namespace can span multiple assembly.

 

6. Mention the execution process for managed code.

A)Choosing a language compiler
B) Compiling the code to MSIL
C) Compiling MSIL to native code
D) Executing the code.

 

7. What is Microsoft Intermediate Language (MSIL)?

The .NET Framework is shipped with compilers of all .NET programming languages to develop programs. There are separate compilers for the Visual Basic, C#, and Visual C++ programming languages in .NET Framework. Each .NET compiler produces an intermediate code after compiling the source code. The intermediate code is common for all languages and is understandable only to .NET environment. This intermediate code is known as MSIL.

 

8. What is managed extensibility framework?

Managed extensibility framework (MEF) is a new library that is introduced as a part of .NET 4.0 and Silverlight 4. It helps in extending your application by providing greater reuse of applications and components. MEF provides a way for host application to consume external extensions without any configuration requirement.

 

9. Which method do you use to enforce garbage collection in .NET?

The System.GC.Collect() method.

 

10. What is the difference between int and int32.

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

 

11. What are tuples?

Tuple  is a fixed-size collection that can have elements of either same or different data types. Similar to arrays, a user must have to specify the size of a tuple at the time of declaration. Tuples are allowed to hold up from 1 to 8 elements and if there are more than 8 elements, then the 8th element can be defined as another tuple. Tuples can be specified as parameter or return type of a method.

 

12. What is the full form of ADO?

The full form of ADO is ActiveX Data Object.

 

13. What are the two fundamental objects in ADO.NET?

DataReader and DataSet are the two fundamental objects in ADO.NET.

 

14. What is the meaning of object pooling?

Object pooling is a concept of storing a pool (group) of objects in memory that can be reused later as needed. Whenever, a new object is required to create, an object from the pool can be allocated for this request; thereby, minimizing the object creation. A pool can also refer to a group of connections and threads. Pooling, therefore, helps in minimizing the use of system resources, improves system scalability, and performance.

 

15. Mention the namespace that is used to include .NET Data Provider for SQL server in .NET code.

The System.Data.SqlClient namespace.

 

16. Which architecture does Datasets follow?

Datasets follow the disconnected data architecture.

 

17. What is the role of the DataSet object in ADO.NET?

One of the major component of ADO.NET is the DataSet object, which always remains disconnected from the database and reduces the load on the database.

 

18. Which property is used to check whether a DataReader is closed or opened?

The IsClosed property is used to check whether a DataReader is closed or opened. This property returns a true value if a Data Reader is closed, otherwise a false value is returned.

 

19. Name the method that needs to be invoked on the DataAdapter control to fill the generated DataSet with data?

The Fill() method is used to fill the dataset with data.

 

20. What are the pre-requisites for connection pooling?

There must be multiple processes to share the same connection describing the same parameters and security settings. The connection string must be identical.