C# Help - C# Community and Information

Visual Studio.Net – Create Property Macro for C#

March 30th, 2006 in Other by admin


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

Download:

Download ReflectionITMacro.zip

Requirements:

Microsoft Visual Studio.NET beta 2

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 enter the Datatype and the Property you want to add.

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

Most Commented Articles :

Leave a Reply

RSS Feed Follow Us on Twitter!