ReSharper Web Help

ReSharper | Options | Code Editing | Visual Basic .NET | Context Actions

By selecting or clearing check boxes in this page, you can compile the list of available Context Actions. When you select a specific context action, you can read its description in the bottom of the page.

ReSharper provides the following context actions for VB:

Name Description
Add new format item Adds new format item to format string and new argument to Format method invocation
Add other accessor(s) Adds missing accessor to a property or any missing accessors to an event.
Annotate with 'value can be null' attribute Annotates with 'value can be null' attribute. The attribute can be configured via external annotations. For more information, see External Annotations.
Annotate with 'value cannot be null' attribute Annotates with 'value cannot be null' attribute. The attribute can be configured via external annotations.
Change member visibility Available on an access modifier keyword and allows changing access rights of a declaration.
Convert 'For Each' to 'For' on variable loop Works on 'For Each' statements executed on a collection that allows direct access to its elements by index. It converts such 'For Each' statement to 'For' on variable statement.
Convert 'Function' to 'Sub' Converts 'Function' to 'Sub' removing 'As' clause.
Convert 'If' statement to 'Select Case' statement Works on 'If' statement that compares value of an expression with one or more constants. It converts such 'If' statement into a 'Select Case' statement.
Convert 'Sub' to 'Function' Converts 'Sub' to 'Function' adding 'As' clause.
Convert to implicitly typed local variable declaration Converts local variable declaration to implicitly typed declaration.
Create overload without parameter Creates overload without given parameter. Invokes current member.
Implement abstract member Works on an interface member or an abstract member. Searches for classes where this member needs to be implemented and allows to implement it in one of them.
Implement virtual member Works on a virtual member. Searches for classes where this member can be implemented and allows to implement it in one or all of them.
Initialize auto-property from constructor parameter Optionally creates and initializes auto-property from constructor parameter
Initialize field from constructor parameter Optionally creates and initializes field from constructor parameter
Insert inferred type arguments Inserts method's inferred type arguments.
Introduce variable from expression statement Introduces variable from expression statement
Invert 'If' statement Inverts guard condition of an 'If' statement and swaps the branches' code accordingly.
Iterate via 'For Each' Works on an expression of System.ICollection type or other expression whose value can be iterated with 'foreach' statement. Generates a 'For Each' statement iterating the expression.
Join local variable declaration and assignment Works on an assignment to a variable that was declared without initializer. Moves the declaration to the current point and merges it with the assigment.
Match file name with type name Renames current file to match the name of the only top-level type declared therein.
Merge nested 'If' statements Merges two nested 'If' statements to a single 'If' statement that checks conjunction of the original conditions.
Move concatenation argument to formatting argument Moves concatenation argument to new argument of format method and injects a format item to format string argument.
Move type to another file to match its name Moves current type to another file so that its name matches the name of the type.
Remove format item Removes format string item and proper formatting method argument
Replace auto-property with backing field Replaces auto-property with property that utilizes backing field.
Replace backing field with auto-property Replaces property that utilizes backing field with auto-property.
Reverse assignment statement Reverses source and destination parts of an assignment statement.
Specify type in local variable declaration Explicitly specifies type in implicitly typed local variable declaration.
Split declaration list Works on variable declaration statement that declares multiple variables. It splits such statement into multiple statements each declaring a single variable.
Split local variable declaration and assignment Moves variable initializer from declaration statement to separate assignment statement.
Split string literal Splits string literal into two literals.
Splits 'If' statement to nested statements Works on 'If' statement whose condition is conjunction ('AndAlso') of two simpler conditions. It converts such 'If' statement into two nested 'If' statements.
Surround with format Surrounds string with String.Format() call.
Surround with 'With' Surrounds block with 'With' construct.
Use format string Converts concatenation of a few strings and other objects to the use of string.Format method.

Note

ReSharper's settings are saved in settings layers that enable you to have different settings for different solutions as well as to share your settings with your team. To learn more, study the Managing and Sharing Options section.