How can you clean up objects holding resources from within
the code?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
What is difference between .net and c#?
Which class does the remote object has to inherit?
What is event and delegates in c#?
What are virtual methods? How are they used?
Is as operator in c#?
What are the 3 types of comments in c#?
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
What are the boolean data types in c#?
What is private class in c#?
How do I develop c# apps?
What does the keyword virtual mean in the method definition?
Explain About Postback