What are destructors in C#?

Answer Posted / hrpynux@gmail.com

Destructors in C++ are members functions in a class that delete an object. They are called when the class object goes out of scope such as when the function ends, the program ends, a delete variable is called etc. ... Also, destructors have the same name as their class and their name is preceded by a tilde(~).

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 object array in c#?

705


What is cls, cts and clr in net?

660


Does c# have a 'throws' clause?

757


What does the dispose method do with the connection object?

724


What is a clr host?

713


What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)?

700


Can we set image Source dynamically using C# in WPF application?

833


What are the collection types can be used in c#?

629


What is string literal in c#?

675


Does c# support const methods, properties, or events?

713


What are the different types of classes in c#?

686


What is the Signification of the "new " keyword in C#? example

696


What are the collections in c#?

653


How to parse a date time string?

721


How can i Spawn a Thread

674