ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Declare template parameters

Last modified: 11 February 2024

Code templates can adjust to the surrounding context or even act interactively when you apply them. All this is done with template parameters and template macros.

You can define and edit template parameters in the Template editor. As soon as you type a parameter (prefixed and suffixed with $), it becomes available in the Parameters section to the right of the text area . You can then configure its behavior by clicking Choose macro:

ReSharper: Template editor

You can use any parameter in a template more than once; their values will be synchronized when the template applies.