Skip to content

Monthly Archives: March 2006

How do I play default Windows sounds?

Sometimes, you might want to make your application a bit more audible. If you are using .NET 2.0, you can utilize the new System.Media namespace and its SystemSound and SystemSounds classes.
The SystemSounds class contains five static properties that y…

Continue Reading: How do I play default Windows sounds? →
How can I easily log a message to a file for debugging purposes?

Often, you need a way to monitor your applications once they are running on the server or even at the customer site — away from your Visual Studio debugger. In those situations, it is often helpful to have a simple routine that you can use to log mess…

Continue Reading: How can I easily log a message to a file for debugging purposes? →
How can I speed up hashtable lookups with struct object as keys?

When you have struct objects as the key in a hashtable, the lookup operation of the hashtable performs miserably. This can be attributes to the GetHashCode() function which is used internally to do the lookup.

If a struct contains only simple value t…

Continue Reading: How can I speed up hashtable lookups with struct object as keys? →