JetBrains Rider 2020.3 Help

Context Actions for Visual Basic .NET

JetBrains Rider provides the following context actions for VB.NET:

NameDescription
Add new argument to interpolationAdds new argument to interpolation and converts string to interpolation if necessary
Add new format itemAdds new format item to format string and new argument to Format method invocation
For more information, see Code Analysis and Helpers for String Literals.
Add other accessor(s)Adds missing accessor to a property or any missing accessors to an event.
Annotate with 'value can be null' attributeAnnotates with 'value can be null' attribute. The attribute can be configured via external annotations.
For more information, see using context actions to add annotation attributes.
Annotate with 'value cannot be null' attributeAnnotates with 'value cannot be null' attribute. The attribute can be configured via external annotations.
For more information, see using context actions to add annotation attributes.
Change member visibilityAvailable on an access modifier keyword and allows changing access rights of a declaration.
Convert 'For Each' to 'For' on variable loopWorks 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' statementWorks 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 iterator to methodConverts iterator to method or property with List<T> fill or array return
Convert 'Sub' to 'Function'Converts 'Sub' to 'Function' adding 'As' clause.
Convert to implicitly typed local variable declarationConverts local variable declaration to implicitly typed declaration.
Convert to string interpolationConverts regular string to interpolation.
Convert to string interpolationConverts string.Format call to string interpolation even in case that could change control flow.
Create overload without parameterCreates overload without given parameter. Invokes current member.
Implement abstract memberWorks on an interface member or an abstract member. Searches for classes where this member needs to be implemented and allows implementing it in one of them.
Implement virtual memberWorks on a virtual member. Searches for classes where this member can be implemented and allows implementing it in one or all of them.
Initialize auto-property from constructor parameterOptionally creates and initializes auto-property from constructor parameter
Initialize field from constructor parameterOptionally creates and initializes field from constructor parameter
Insert inferred type argumentsInserts method's inferred type arguments.
Introduce variable from expression statementIntroduces variable from expression statement
Invert 'If' statementInverts 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 assignmentWorks on an assignment to a variable that was declared without initializer. Moves the declaration to the current point and merges it with the assignment.
Match file name with type nameRenames current file to match the name of the only top-level type declared therein.
Merge nested 'If' statementsMerges two nested 'If' statements to a single 'If' statement that checks conjunction of the original conditions.
Move type to another file to match its nameMoves current type to another file so that its name matches the name of the type.
Remove format itemRemoves format string item and proper formatting method argument
For more information, see Code Analysis and Helpers for String Literals.
Replace auto-property with backing fieldReplaces auto-property with property that utilizes backing field.
For more information, see Use Auto-Properties
Replace backing field with auto-propertyReplaces property that utilizes backing field with auto-property.
For more information, see Use Auto-Properties
Reverse assignment statementReverses source and destination parts of an assignment statement.
Specify type in local variable declarationExplicitly specifies type in implicitly typed local variable declaration.
Split declaration listWorks 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 assignmentMoves variable initializer from declaration statement to separate assignment statement.
Split string literalSplits string literal into two literals.
Splits 'If' statement to nested statementsWorks on 'If' statement whose condition is conjunction ('AndAlso') of two simpler conditions. It converts such 'If' statement into two nested 'If' statements.
Surround with formatSurrounds string with String.Format() call.
Surround with 'With'Surrounds block with 'With' construct.
Use format stringConverts concatenation of a few strings and other objects to the use of string.Format method.
For more information, see Code Analysis and Helpers for String Literals.
Use string interpolationConverts concatenation of a few strings and other objects to the use of string interpolation.
Last modified: 08 March 2021