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 is Implementation inheritance and interface inheritance?

0 Answers  


Is c# still popular?

0 Answers  


What is the syntax for calling an overloaded constructor within a constructor?

0 Answers  


Structs are largely redundant in c++. Why does c# have them?

0 Answers  


What exactly is serverless?

0 Answers  






What is difference between float and decimal?

0 Answers  


Difference between directcast and ctype.

0 Answers  


How do you name a variable in c#?

0 Answers  


Why delegates are required?

0 Answers  


How you will handle session when deploying application in more than a server? Describe session handling in a webform, how does it work and what are the limits?

3 Answers   Microsoft,


C# is case sensitive, what is mean by case sensitive

3 Answers  


To whom a method is accesssed if it is marked as protected internal ?

0 Answers   Siebel,


Categories