JetBrains Rider 2017.3 Help

Generating Code from Usage

JetBrains Rider lets you use code symbols (classes, methods, variables, properties, fields, etc.) before you declare them. When JetBrains Rider detects an undeclared symbol, it suggests one or more quick-fixes for generating the corresponding symbol based on the usage, and then smartly adjust the declaration according to the usage context:

'Generate from usage' quick-fix

For example, if you create a method from usage, JetBrains Rider will not only create a method, but also detect its return type and types of its parameters:

Code Analysis Examples of Quick Fixes undefined method return type

For additional examples of how JetBrains Rider creates code symbols from usages, see Undefined variable and Undefined method call samples in the Examples of Quick-Fixes.

Last modified: 19 April 2018

See Also