Skip to content
| Marketplace
Sign in
Visual Studio>Tools>Quick Add
Quick Add

Quick Add

Bruno Rommens

|
511 installs
| (1) | Free
Extension for adding code elements more quickly
Download

Quick Add allows you to add code elements more quickly.

 

Current features (only for C# projects)

  • Adding new classes with properties generated with one of the following profiles : 

- Public "Get" readonly field properties (with constructor)

- Public "Get, Private Set" auto-implemented properties

- Public "Get, Set" auto-implemented properties

 

Tutorial 1 : Adding an "EvilGenius" class with 3 Public "Get, Set" auto-implemented properties (from solution explorer)

  • Right-click project or project folder from solution explorer, click "New class with properties..." from sub-menu "Add..."

  • Enter class name, select profile and fill each property (name, type name) by tabbing or by clicking the "+" button

  • Click "Add" button or press "Enter" in the empty name textbox

The extension creates and opens the "EvilGenius.cs" file with the entered information :

 

Tutorial 2 : Adding an "EvilGenius" class with 3 Public "Get" readonly field properties (from code)

  • In a code file, type the code line corresponding to the instanciation of a class :

  • Select "EvilGenius", right click on the selected text and click "Add new class with properties..." from the contextual menu

(the name of the class is already filled)

  • Select profile, fill each property and click "Add" button (see Tutorial 1)

The extension creates "EvilGenius.cs" file with the entered information (same level in project as Class1), but stays on the "Class1.cs" file. You can continue to code as below :

The "EvilGenius.cs" file added behind the scenes :

 

Recommended shortcut

Actually, no shortcut is defined for adding class with properties from code. However, you can set one from "Tools", "Options", "Environment", "Keyboard" by searching the "Addnewclasswithproperties" command. I recommend "Ctrl+Shift+/" for QWERTY keyboards and "Ctrl+Shift+!" for AZERTY ones. With the shortcut assigned, you don't have to select text anymore, just fire the command after having typed the name of the class (the extension will find the class name by reading backwards until a space is found)

 

Possible future features

  • Remove buttons for properties
  • VB projects support
  • Localization
  • Watermark textboxes
  • Undo
  • Other generation profiles
  • Configurable prefix for fields
  • ... and find an icon !

 

Reference for the example

Developer productivity: What's new in C# 6 Video from Microsoft Virtual Academy (Bill Wagner with Anthony Green)


  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft