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
Post a Comment