M
Morgan Cheng
In C#, we can initialize static member variables in static constructor.
Now, when to destruct these static member variables? If these variables
hold external reference(e.g. log file stream), it is supposed to be
disposed in *static destructor*. However, there is no so-called *static
destructor*. Is there any substitue of *static destructor* or *static
dispose* in C#?
Now, when to destruct these static member variables? If these variables
hold external reference(e.g. log file stream), it is supposed to be
disposed in *static destructor*. However, there is no so-called *static
destructor*. Is there any substitue of *static destructor* or *static
dispose* in C#?