Destructors
A struct is not permitted to declare a destructor.
Static constructors for structs follow most of the same rules as for classes. The execution of a static constructor for a struct type is triggered by the first of the following events to occur within an application domain:
A static member of the struct type is referenced.
An explicitly declared constructor of the struct type is called.
The creation of default values (§11.3.4) of struct types does not trigger the static constructor. (An example of this is the initial value of elements in an array.)
Do'stlaringiz bilan baham: |