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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you determine whether a string represents a numeric value?

519


Can the nested class access, the containing class. Give an example?

477


What is the difference between serialization and deserialization in c#?

454


What are get and set in c#?

583


What is field in c#?

468






Explain the difference between a sub and a function in c#.

532


Does c# have primitives?

476


Why array is faster than arraylist in c#?

493


What is desktop application testing?

489


Does c# have a 'throws' clause?

581


What benefit do you get from using a primary interop assembly (pia)?

515


How jit (just in time) works?

514


How can I access the registry from c# code?

518


What is the difference between Decorator and Adapter pattern?

528


If I want to override a method one of class A and in class b then how do you declare?

748