Descriptions for Enum

Awhile ago I created a method to simulate a Enum but based on a string value rather than integral numeric (published here on CodeProject). It also allows for adding and extracting a description. However, if you’re just looking for a lightweight way to add a description to your enums, this blog post posits a simple, […]

Obfuscating a ClickOnce Publish

Edit: See updated version specifically for use with VS 2010. I needed to create a ClickOnce publish of an obfuscated exe for a customer since he was concerned about theft of his intellectual property. I added in several security features, but they were worthless if I couldn’t harden the executable against decompilers like .Net Reflector. […]

Excellent Windows API Tool

I stumbled across this add-in which automates the insertion of various Windows API declarations. If you’re like me, you track down solutions to your problem on the Internet, but sometimes it uses an API declaration in C# or VB6. Even worse, sometimes someone will use a non-standard or just plain difficult declaration style, for example: […]

When Compiler Directives Aren’t Enough

If you’ve programmed for any length of time in .NET, you’re probably familiar with the DEBUG compiler constant that you can use to designate code to compile and run depending on your build configuration (e.g. Debug or Release). But very often you don’t care about the configuration you’re running–what you do care about is distinguishing […]

CodeProject: StringEnum

Some time ago I submitted an article to CodeProject and I thought I’d post a link to it here. It’s not a new idea, but I think a novel implementation. The article’s purpose is to provide functionality like an Enum, but using a string as the target data type. I’ve actually used it quite frequently […]