Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 967 Bytes

generate-parameter.md

File metadata and controls

37 lines (26 loc) · 967 Bytes
title description ms.date ms.topic author ms.author manager ms.subservice dev_langs
Generate parameter refactoring
Learn how to use the Quick Actions and Refactorings menu to automatically generate a method parameter.
03/10/2020
reference
mikadumont
midumont
mijacobs
general-ide
CSharp
VB

Generate parameter

This refactoring applies to:

  • C#

  • Visual Basic

What: Automatically generates a method parameter.

When: You reference a variable in a method that doesn't exist in the current context and receive an error; you can generate a parameter as a code fix.

Why: You can quickly modify a method signature without losing context.

How-to

  1. Place your cursor in the variable name and press Ctrl+. to trigger the Quick Actions and Refactorings menu.

  2. Select Generate parameter.

    Generate parameter

See also