What is Dispose method in .NET?
Answers were Sorted based on User's Feedback
The GC call the Finalize () function automatically to
destroy the object called implicit destroy. When you want
to destroy a objects that you think no longer need and free
it from memory, then we will use the dispose function. For
better
Performance we will use the dispose function explicitly.
The Dispose method in .NET belongs to IDisposable interface
and it is best used to release unmanaged objects like File
objects, Windows API objects, Database connection objects,
COM objects etc from the memory. Its performance is better
than the finalize() method.
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / bhasker
The Dispose method may be called on any instance of any type implementing the IDisposable interface. This is supported by the C# using statement which makes calling Dispose automatically easy.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is c sharp used for?
Can we create multiple constructors?
What does void do in c#?
What is uint c#?
What are the different approaches of passing parameters to a method?
Is there a way of specifying which block or loop to break out of when working with nested loops?
What are virtual destructors?
0 Answers InfoAxon Technologies,
Why we can't create the object of abstract class ?
15 Answers Assyst, CTS, HCL, IBM, L&T,
What is the difference between an implicit conversion and an explicit conversion?
if i used stored procedure for retrieving the data from sql server.in front end i had used data reader.when 100 records are there in table.when it has displayed ten records in frontend database has been collapsed.then where should our data available...
Explain Constructor and destructor?
What are the keywords used to pass parameters to the base class and how do I invoke other constructors.
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)