static destructor

后端 未结 6 1687
情歌与酒
情歌与酒 2020-12-04 17:46

C# has static constructor which do some initialization (likely do some unmanaged resource initialization).

I am wondering if there is static destructor?

6条回答
  •  北海茫月
    2020-12-04 17:52

    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.

提交回复
热议问题