ReSharper
 
Get ReSharper
You are viewing the documentation for an earlier version of ReSharper.

Declare template parameters

Last modified: 21 July 2022

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.