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

Answers were Sorted based on User's Feedback



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

Answer / ramesh

We can clean up object holding resources by using dispose()
method. Example
DataSet DS=new DataSet()

DS.Dispose()

Is This Answer Correct ?    5 Yes 1 No

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

Answer / mohan kumar e.

We can cleanup objects by implementing IDisposable
interface and providing the implementation for Dispose
method.

Is This Answer Correct ?    3 Yes 1 No

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

Answer / nagasaichand

2 PROCEDURES FORT THIS:
1)Make that value of object as null once the scope is finished.
2)use dispose(); method

Is This Answer Correct ?    1 Yes 0 No

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

Answer / tarun singla

Easiest way is to make the value of that object as null,
once the scope of that object is over. We generally do this
in the 'finally' section of the code.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is difference between .net and c#?

0 Answers  


Which class does the remote object has to inherit?

0 Answers  


What is event and delegates in c#?

0 Answers  


What are virtual methods? How are they used?

3 Answers   TCS,


Is as operator in c#?

0 Answers  






What are the 3 types of comments in c#?

0 Answers  


3. Use layered architecture for coding. s.no name description 1 abc xxxxxxxxx 2 abc xxxxxxxxx 3 4 5 6 7 8 Select all Clear all Add Delete Name Description Save close

0 Answers  


What are the boolean data types in c#?

0 Answers  


What is private class in c#?

0 Answers  


How do I develop c# apps?

0 Answers  


What does the keyword virtual mean in the method definition?

1 Answers  


Explain About Postback

0 Answers   BirlaSoft,


Categories