Explain the difference between dispose and finalize()?
Answer / Kushal Kumar
In .NET, Dispose is a method that developers can call to release resources such as memory or file handles that their objects are using. This is typically done in the 'using' statement. Finalize is a method that the .NET runtime calls when an object is garbage collected. The Finalize method allows objects to perform any necessary cleanup tasks before they are destroyed. However, finalization is slower than disposal because it requires the object to be garbage collected first. Additionally, calling Dispose manually ensures that resources are released promptly, while relying on finalization means there may be a delay.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the differences between vb.net and c#, related to oops concepts
Define naming convention?
Explain about visual basic?
Explain i.tostring method?
Explain an assembly and its use?
sir i want to ask you that how can i fetch or get sql data into texboxes.where i want to show record in specific texboxes related to student information.when i click on button all data show on texboxes when i put id or name plz inform me on my id
What is the difference between readonly variable and constant variable?
What is the difference between manifest and metadata?
What is the purpose of an Assembly?
Explain jagged array in vb.net?
What is an abstract class?
What is the Difference between Overriding and overloading?
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)