What to include in a Utility Library

With more and more projects under my belt I find that I am often repeating many common tasks from project to project, client to client. So I have started to assemble a “utility” library, a collection of these common elements that are often repeated from project to project.

So far I have utilities to resize images, export data grids to excel, send e-mails, and replace tokenized messages.

If you were building/using a .NET utility class library, what types of processes would you see as helpful? What namespaces/groups would you envision?


I am talking about an actual class library, separated into namespaces to group common elements.

How do you convert LOGFONT.lfHeight to pixels?

I have a LOGFONT.lfHeight value of -11. However, I know that the font size is actually 8 so do I need to convert this number to a different unit of measurement? I found this formula in the MSDN docs:

int height = abs((pixels * DOTSY) / 72);

This takes pixels and makes it into a height value that LOGFONT can use. If I work this the other way:

int pixels = abs((height / DOTSY) * 72);

This gives me a value of 8.24. Am I correct in assuming this is all I need to do to convert the font height into a usable value?