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 |
Can two catch blocks be executed?
Define a class and an object?
What is the minimum size (in bytes) of string data type in c#? Give its compatible data type in .NET Framework.
C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write?
What are the advantages of using c#?
What is shared inheritance
What is default class in c#?
Is hashset serializable c#?
What are the namespace level elements?
Can you declare the override method static while the original method is non-static?
I wish to create a windows application to perform a similar function as that of the "Search" which is provided to look for related files and folders in the System.. What steps must i follow??
Can we inherit class that contains only one private constructor?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)