Create Property Macro for VS.NET 2002 & 2003
By Fons Sonnemans
Download
LocalizedText.zip
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'.
Example:
|
1.
|
Unzip the ReflectionIT macro.zip
|
|
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.
Example:
|
|
|
|
|
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 Fons.Sonnemans@reflectionit.nl