A few days ago I posted about writing properties. I got a couple interesting and thought provoking comments from Dennis Webb about how it would be nice if:
- We didn't have to declare private member variables for properties, essentially saying let the compiler determine that one is needed and inject it into the IL where appropriate, or
- If that's not possible, have the IDE auto-generate the private member variables for us
Of course, this got me thinking and since I can't do much about #1, I can do something to address #2. I've been wanting to play around with creating an add-in for Visual Studio anyway, and this gave me the right opportunity to do that. So I spent a few hours and built an add-in named “CreateProperty Add-In” for Visual Studio .NET 2003.
The add-in will auto-generate properties for you and if you'd like, it's private member variable as well. It works for VB.NET and C#, so give it a try and let me know what you think. The download is free and comes with all source code.
Even if this isn't a huge benefit to people, it was *fun* to go through the exercise of building the add-in. I learned some things along the way that I'll post soon because building an add-in is a different beast.
Print | posted on Wednesday, November 17, 2004 8:01 AM