Inline method
This refactoring applies to:
C#
Visual Basic
What: Inline method refactoring.
When: You want to replace usages of a static, instance, and extension method within a single statement body with an option to remove the original method declaration.
Why: This refactoring will provide a more clear syntax.
How-to
Place your caret on the usage of the method.
Press Ctrl+. to trigger the Quick Actions and Refactorings menu.
Select from one of the following options:
Select Inline
<QualifiedMethodName>
to remove the inline method declaration:Select Inline and keep
<QualifiedMethodName>
to preserve the original method declaration:
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for