I wrote this a while ago on my old blog, so I'm just reposting here. It's useful since you can have an enum of error codes, which also, when converted to human readable text, are useful messages. Here's how I did it.
I found this slick little app a few years ago, and it looks like it's still around. Count your VC# and VC+ lines, and it differentiates between code lines, blank lines, designer lines, etc, which is nice. The downside: it's really only useful for VC# and VC+ projects, which is alright if that's all you are working with. Check it out. C#, Visual Basic and C++ .NET Line Count Utility - The Code Project - .NET PS. You'll note that I didn't mention …