What are the steps followed by the Garbage Collector ?

Tuesday, August 4, 2009


1. Mark all the managed memory as garbage
2. Look for used memory blocks, and mark them as valid memory
3. Discard all unused memory blocks
4. Compact the heap



www.codecollege.NET

What is the error that is thrown while a method is written without a return type. ?


Not all code paths return a value.



www.codecollege.NET

Can we apply access modifiers to the methods of an interface?


No.



www.codecollege.NET

Can we define variables in interfaces?


No.



www.codecollege.NET

What is the use of ADO.NET Connection Pooling ?


The use of ADO.NET Connection Pooling is it reuses connections from a pool of Connections instead of establishing connection every time.



www.codecollege.NET

How will you enable ADO.NET MARS ?


You can enable MARS by setting the MultipleActiveResultSets attribute in the Connection String as follows,

"Server=localhost;Database=Northwind;" +
"Trusted_Connection=True;MultipleActiveResultSets=True";




www.codecollege.NET

what is MARS in ADO.NET ?


MARS(Multiple Active Result Sets) allows you to execute multiple queries or Stored Procedures with a single Connection.



www.codecollege.NET
Blog Widget by LinkWithin