What is the difference between finally and finalize block?
Answer / Madhumeeta
In C#, `finally` is a clause in a try-catch-finally statement that executes regardless of whether an exception occurs or not. It's used to ensure proper cleanup of resources. On the other hand, `finalize` is a method declared with the `~` symbol before its name and has special meaning for garbage collection.nIt allows you to perform any necessary cleanup when an object is about to be destroyed by the garbage collector.
| Is This Answer Correct ? | 0 Yes | 0 No |
Is string a primitive data type in c#?
What does void do in unity?
Which of these statements correctly declares a two-dimensional array in c#?
What is Covariance and contravariance in C#?
what are the bugs are faced in a project
in object oriented programming, how would you describe encapsulation?
What is a sealed class?
What are the security issues if we send a query from the application?
Where is the main method in c#?
What is func c#?
Explain about finalize method?
What are accessors?
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)