C# has static constructor which do some initialization (likely do some unmanaged resource initialization).
I am wondering if there is static destructor?
No, there isn't. The closest thing you can do is set an event handler to the DomainUnload event on the AppDomain and perform your cleanup there.
DomainUnload
AppDomain