Create Property Macro for VS.NET 2002 & 2003

By Fons Sonnemans, 01-jan-2002

By Fons Sonnemans


The CreateProperty macro is simple Visual Studio.Net (Final) macro which can be used to generate the code for a 'private Field and a public Property Get/Set method'.


1. Unzip the ReflectionIT
2.  Start Visual Studio.Net.
3.  Open the Macro Explorer (Alt-F8)
4.  Right-click on the Macros, and select 'Load Macro Project...'
5.  Select the (unzipped) 'ReflectionIT.vsmacros' file and select 'Open'. 
6. Open a CodeWindow and add a public, private or protected field.


7. Select the text you just have entered and run the 'CreateProperty' macro

8. Your text is automatically replaced by a private field and an public property

Any suggestions and feedback for improving this article is most welcome. Send your suggestions and feedback to

Leave a Comment

Leave a Comment
1 + 7 =


All postings/content on this blog are provided "AS IS" with no warranties, and confer no rights. All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer or sponsors. The content on this site is licensed under a Creative Commons Attribution By license.