Can you declare a C++ type destructor in C# like ~MyClass() ?



Can you declare a C++ type destructor in C# like ~MyClass() ?..

Answer / mr vinod kumar

Yes, but what's the point, since it will call Finalize(), and Finalize() has no guarantees when the memory will be cleaned up, plus, it introduces additional load on the garbage collector.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What are the types of methods in c#?

0 Answers  


Can you prevent your class from being inherited and becoming a base class for some other classes?

3 Answers  


Explain the difference between boxing and unboxing.

0 Answers   Accenture,


How do you implement multiple inheritance in .NET?

5 Answers   Infosys, Microsoft,


Explane each and every methods of nterface Queue? Explain About performance issues on retrieving records

0 Answers   DELL,






What is event sourcing in c#?

0 Answers  


How to run the program at particular time? It should run everyday at 3:00 PM. After executing the program should sleep until next day at 3:00 PM. Please explain with code?

5 Answers   Sanat, Wipro,


What is the difference between interface and abstract class ?

2 Answers   Basware, BITS,


What is difference between struct and class in c#?

0 Answers  


how to implement a web service in .net

0 Answers  


How can you use abstract class and interface?

0 Answers   Accenture,


What is the use of properties window?

0 Answers  


Categories