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

What is difference between ienumerable and iqueryable in c#?

510


What is global asax in c#?

536


What is the difference between class and namespace?

501


What is difference between an reference type and value type in C#?

574


Suppose you have already existing application with Visual Studio 6 (VB 6, InterDev 6) and this application utilizes Windows 2000 COM+ transaction services. With this example how can you approach migrating this application to .NET?

516






Can you specify nested classes as partial classes?

525


How Is The Dll Hell Problem Solved In .net?

603


Explain the role of Garbage collector and its generations?

534


What are Types of assemblies that can be created in dotnet

592


Why are dynamic link library used over static one?

556


Why do we need interface in c#?

518


What is the difference between dynamic and var in c#?

475


Describe a Struct ?

557


Explain the differences between static, void and public in c#?

540


What operators can be used to cast from one reference type to another without the risk of throwing an exception?

526