0% found this document useful (0 votes)
149 views

Net Interview Question

VB.NET provides managed code execution under the Common Language Runtime (CLR) for robust, stable and secure applications. It is fully object-oriented and leverages features of the .NET framework like ADO.NET's disconnected model for improved scalability. Error handling uses Try-Catch-Finally blocks and free threading allows background processing for better usability and control. Security is also enhanced with code access controls.

Uploaded by

Ankit Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
149 views

Net Interview Question

VB.NET provides managed code execution under the Common Language Runtime (CLR) for robust, stable and secure applications. It is fully object-oriented and leverages features of the .NET framework like ADO.NET's disconnected model for improved scalability. Error handling uses Try-Catch-Finally blocks and free threading allows background processing for better usability and control. Security is also enhanced with code access controls.

Uploaded by

Ankit Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

.Net Interview Question Q1. What is CLR?

Ans Full form of CLR is Common Language Runtime and it forms the heart of the .NET framework.All Languages have runtime and its the responsibility of the runtime to take care of the code execution of the program.For example VC++ has MSCRT40.DLL,VB6 has MSVBVM60.DLL , Java has Java Virtual Machine etc. Similarly .NET has CLR.Following are the responsibilities of CLR Garbage Collection :- CLR automatically manages memory thus eliminating memory leakes. When objects are not referred GC automatically releases those memory thus providing efficient memory management. Code Access Security :- CAS grants rights to program depending on the security configuration of the machine.Example the program has rights to edit or create a new file but the security configuration of machine does not allow the program to delete a file.CAS will take care that the code runs under the environment of machines security configuration. Code Verification :- This ensures proper code execution and type safety while the code runs.It prevents the source code to perform illegal operation such as accessing invalid memory locations etc. IL( Intermediate language )-to-native translators and optimizer?s :- CLR uses JIT and compiles the IL code to machine code and then executes. CLR also determines depending on platform what is optimized way of running the IL code. Q2. What is CTS? Ans CTS defines all of the basic types that can be used in the .NET Framework and the operations performed on those type. All this time we have been talking about language interoperability, and .NET Class Framework. None of this is possible without all the language sharing the same data types. What this means is that an int should mean the same in VB, VC++, C# and all other .NET compliant languages. This is achieved throughintroduction of Common Type System (CTS) Q3 What Is The Difference Between ViewState and SessionState? Ans view state & session state are objects which are used for maintaining a state. but view state maintains a state in a single page.if we go to another page the state will be lossed. busession state we can maintain a state as long as browser opened or session time expired. Q4. Advantage of VB.Net? Ans .NET has 4 strong advantages 1).NET is a language independent 2)Automatic memory management(garbage collection) 3)Disconnected architecture 4)Object Oriented

First of all, VB.NET provides managed code execution that runs under the Common Language Runtime (CLR), resulting in robust, stable and secure applications. All features of the .NET framework are readily available in VB.NET. 1. First of all, VB.NET provides managed code execution that runs under the Common Language Runtime (CLR), resulting in robust, stable and secure applications. All features of the .NET framework are readily available in VB.NET. 2. VB.NET is totally object oriented. This is a major addition that VB6 and other earlier releases didn't have. 3. The .NET framework comes with ADO.NET, which follows the disconnected paradigm, i.e. once the required records are fetched the connection no longer exists. It also retrieves the records that are expected to be accessed in the immediate future. This enhances Scalability of the application to a great extent. 4. VB.NET uses XML to transfer data between the various layers in the DNA Architecture i.e. data are passed as simple text strings. 5. Error handling has changed in VB.NET. A new Try-Catch-Finally block has been introduced to handle errors and exceptions as a unit, allowing appropriate action to be taken at the place the error occurred thus discouraging the use of ON ERROR GOTO statement. This again credits to the maintainability of the code. 6. Another great feature added to VB.NET is free threading against the VB singlethreaded apartment feature. In many situations developers need spawning of a new thread to run as a background process and increase the usability of the application. VB.NET allowsdevelopers to spawn threads wherever they feel like, hence giving freedom and better control on the application. 7. Security has become more robust in VB.NET. In addition to the role-based security in VB6, VB.NET comes with a new security model, Code Access security. This security controls on what the code can access. For example you can set the security to a component such that the component cannot access the database. This type of security is important because it allows building components that can be trusted to various degrees. 8. The CLR takes care of garbage collection i.e. the CLR releases resources as soon as an object is no more in use. This relieves the developer from thinking of ways to manage memory. CLR does this for them

You might also like