1. What is the difference between proc. sent BY VAL and BY SUB?

BY VAL: changes will not be reflected back to the variable.
By REF: changes will be reflected back to that variable.( same as & symbol in c, c++)

2. Which control cannot be placed in MDI?

The controls that do not have events.

6. How can you clean up objects holding resources from within the code?

Call the dispose method from code for clean up of objects

7. Describe ways of cleaning up objects in C#.

There is a perfect tool provide by .net frameworks calles Garbage collector, where by mean of GC we can clean up the object and reclaim the memory.The namespace used is System.GC

the run time will maintain a service called as garbage collector.this service will take care of deallocating memory corresponding to objects.it works as a thread with least priority.when application demenads for memory the runtime will take care of setting the high priority for the garbage collector,so that it will be called for execution and memory will be released.the programmer can make a call to garbage colector by using GC class in ststem name space.

8. Constructor in C#.

Constructor is a method in the class which has the same name as the class (in VB.Net its New()). It initialises the member attributes whenever an instance of the class is created.

9. What are the two kinds of properties.

Two types of properties in .Net: Get and Set

10. Difference between value and reference type.

what are value types and reference types?
Value type - bool, byte, chat, decimal, double, enum , float, int, long, sbyte, short, strut, uint, ulong, ushort
Value types are stored in the Stack
Reference type - class, delegate, interface, object, string
Reference types are stored in the Heap

Download Interview PDF