What is a Destructor in C#?

Technology CommunityCategory: C#What is a Destructor in C#?
VietMX Staff asked 3 years ago

Destructor is used to clean up the memory and free the resources. But in C# this is done by the garbage collector on its own. System.GC.Collect() is called internally for cleaning up. But sometimes it may be necessary to implement destructors manually.