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 are three test cases you should go through in unit testing?
1 Answers Siebel Systems, Wipro,
i have a question which is quite simple but yet complicated for me my question is why do we use void, if it does not return anything to the compiler? if it is used for normal display it can also be done by what is called Console.Write() or Consol.WriteLine() and if i do not use void with my method then my compiler throws me an error. if i return a value say integer then i write public int fun() display of the result can also be done here then why is it so necessary to use void with a function and why so compiler throw us an error if v don't use void return type?
Is xml tags are case sensitive?
Is goto statement supported in C#? How about Java?
What is an int in c#?
What is the difference between values and reference types?
What is the difference between int and int in c#?
Why static variables are used?
Is c# code is managed or unmanaged code?
How many bytes is an int?
What is data annotation in c#?
Difference between multi-level and multiple inheritance?