c#-Any disadvantages if Static event is called from static constructor -


are there disadvantages assigning static events static constructors?

for example:

public class static test() {     static test()     {         appdomain.currentdomain.domainunload += currentdomain_domainunload;     }      static void currentdomain_domainunload(object sender, eventargs e)     {         cleanup();     } } 

is there disadvantages using ...

no, subscribing event fine.

raising problematic doesn't apply here.


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -