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, ushortValue types are stored in the StackReference type - class, delegate, interface, object, stringReference types are stored in the Heap.
What are the two kinds of properties.
Two types of properties in .Net: Get and Set
Explain constructor.Constructor is a method in the class which has the same name as the class (in VB.Net its New()). It initializes the member attributes whenever an instance of the class is created.
Describe ways of cleaning up objects.
Answer1There is a perfect tool provide by .net frameworks calls Garbage collector, where by mean of GC we can clean up the object and reclaim the memory. The namespace used is System.GC
Answer2 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 demands 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 collector by using GC class in system name space.
How can you clean up objects holding resources from within the code?
Call the dispose method from code for clean up of objects
Which controls do not have events?
Timer control.
What is the maximum size of the textbox?
65536.
Which property of the textbox cannot be changed at runtime?
Locked Property.
Which control cannot be placed in MDI?
The controls that do not have events.
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++)
About Me
- Real Time Scenario
- All about Real time requirements in Orale Stay Tune!!
Sunday, April 6, 2008
C# INTERVIEW QUESTIONS
Posted by Real Time Scenario at 11:40 AM
Labels: C# INTERVIEW QUES-33
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment