Category: Programming

Automatically clear Windows logon warning message

I don’t know how widespread a problem this is, but I frequently log on to domains directly or via VPN for clients, and end up with the company’s corporate warning message on my machine on startup. Bad enough to get

Thread-safe generic collections, containers and dictionaries in .NET

It is very common with threaded applications to need to share data between threads, often in the form of dictionaries, lists, stacks, etc. However, the standard containers (generic or otherwise) in .NET are not thread-safeā€”if you just, say, reference a

Tagged with: , , ,

Utility for opening CD Drive

The CD Drive on my mother’s laptop was somewhat tricky to open (the button was a bit fiddly) so I threw together a utility so that she could double-click a shortcut from the desktop to pop open the drive. I

Tagged with: , ,

Handling long operations with cancel and progress in C# with async

In a previous post, I demonstrated a convenient way to make a wait cursor show up during “reasonably” long operations (up to a few seconds). For anything longer than that, though, a wait cursor won’t cut it — for one

Tagged with: , , , , , , ,

C# Wait Cursor that automatically goes away

I actually did a post around this topic a while ago on another site that is now defunct, but I figured it is still useful, and I have a few additional details to add. Back in the C++/MFC days, there

Tagged with: , , ,

New features of C# 6.0

With the recent release of C# 6.0, I thought it would be good to provide a brief explanation of the new features of the language. I’ve done them as individual posts: Null-conditional operators Auto-property initializers using static Expression bodies on

Tagged with: ,

Index initializers

This is one of a series of posts on some of the new features in C# 6.0, which was just released. When Linq was added, a number of cool side-features ended up being added as well–these were things that were

Tagged with: ,

nameof expression

This is one of a series of posts on some of the new features in C# 6.0, which was just released. In C# there is a very handy expression – typeof – that returns the Type of an object. For

Tagged with: ,

String interpolation

This is one of a series of posts on some of the new features in C# 6.0, which was just released. The ability to format strings in .NET is straightforward, and fairly powerful (ignore the line breaks): string value =

Tagged with: ,

Exception filters

This is one of a series of posts on some of the new features in C# 6.0, which was just released. When catching exceptions in code, you can have a different catch block for different types of exceptions: try {

Tagged with: ,
Top