In this article I will show you how you can unit test your events. I will show you a simple technique that will enable you to test if your events fire exactly as often as you want them to and I will provide you with two implementations. One implementation works well with the .NET Framework 2.0 and the second one uses .NET 3.0 in order to minimize the code necessary.
The above code sets the cursor to a waiting cursor and sets it back to whatever it was after the code finishes. The good thing is that you don’t have to worry about the code in the try block at all. There could be exceptions happening or return statements, the finally block will be called before the execution continues.
This is the first post of a series that will present useful websites for the .NET developer. This time it puts the spotlight on:
With over 19.000 articles, more than four million users and almost five million visitors per month The Code Project is the number one resource for .NET developers. I have been a member of the code project for more than five years and on countless occasions I have taken advantage of the knowledge available on the site.
Enums are a quite handy feature. That is, if you don’t get into the Tool Blame trap. In a sane scenario Enums are very useful. Gone are the days where you had to pass cryptic integer values to methods only to get nothing better in return. One really nice feature when using enums, is that you can decide that elements of an enumeration can be combined.