Dot Net Interview Questions and Answers Part 29

1. What is Dispose method in .NET?

Ans. .NET provides “Finalize” method in which we can clean up our resources. But relying on this is not always good so the best is to implement “IDisposable” interface and implement the “Dispose” method where you can put your clean up routines.

2. How do we assign page specific attributes?

Ans. Page attributes are specified using the @Page directive.

3. What is the use of “OverRides” and “Overridable” keywords?

Ans. Overridable is used in parent class to indicate that a method can be overridden. Overrides is used in the child class to indicate that you are overriding a method  

4. Where are all .NET Collection classes located?

Ans. System.Collection namespace has all the collection classes available in .NET.

5. What is Array List?

Ans. Array is whose size can increase and decrease dynamically. Array list can hold item of different types. As Array list can increase and decrease size dynamically you do not have to use the REDIM keyword. You can access any item in array using the INDEX value of the array position.

6. What’s difference between HashTable and ArrayList ?

Ans. You can access array using INDEX value of array, but how many times you know the real value of index. Hashtable provides way of accessing the index using a user identified KEY value, thus removing the INDEX problem.

7. What are queues and stacks?

Ans. Queue is for first-in, first-out (FIFO) structures. Stack is for last-in, first-out (LIFO) structures.

8. What is ENUM?

Ans. It’s used to define constants.

9. What’ is the sequence in which ASP.NET events are processed?

Ans. Following is the sequence in which the events occur:-

1. Page_Init.


3.Control events

4.Page_Unload event.

Page_init event only occurs when first time the page is started, but Page_Load occurs in subsequent request of the page.

10. How can we identify that the Page is PostBack?

Ans. Page object has a “IsPostBack” property which can be checked to know that is the page posted back.


Receive Quality Tutorials Straight in your Inbox by submitting your Email below:

Delivered by FeedBurner

Protected by Copyscape Duplicate Content Checker