Fun with events and delegates

So how can you verify that a given class raises an event? Well, you can simply write some code that registers an event handler and then cause the target to raise that event. Now, how do you verify that a given class does actually handle an event raised by another class? Basically it’s the same…

1

A good reason for calling GC.Collect()

You’ve probably heard that you should not call GC.Collect() and generally speaking this is absolutely correct. Yes, there are probably exceptions to that rule but unless you know for sure that calling GC.Collect() will improve the runtime behavior of your application you should refrain from making that call. Also, let’s not forget that implementation details…

2