ReSharper Web Help

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

By selecting or clearing check boxes in this tab, you can compile the list of context actions that will be available for VB.NET code. When you highlight the name of a specific context action, you can read its description in the lower part of the tab.

Name Description

Add missing implementations

Works in implements list. Searches for members that this class or structure needs to implement and allows implement them.

Add other accessor(s)

Adds missing accessor to a property or any missing accessors to an event.

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 to one or more constants. 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 attribute Property

Creates property in attribute class.

Create class

Creates top-level class from unknown symbol.

Create constructor

Creates Sub New.

Create delegate

Creates top-level delegate from unknown symbol.

Create enum member

Creates enum member from unknown symbol.

Create event

Creates event declaration from unknown symbol.

Create event handler

Creates event handler method from unknown symbol.

Create Field

Creates field declaration.

Create Field from member initializer

Creates field declaration.

Create Local

Creates local variable declaration.

Create method

Creates method from unknown symbol.

Create nested class

Creates nested class from unknown symbol.

Create nested delegate

Creates nested delegate from unknown symbol.

Create overload without parameter

Creates overload without given parameter. Invokes current member.

Create parameter

Creates parameter declaration.

Create Property

Creates a property declaration.

Create Property from member initializer

Creates a property declaration.

Create Readonly Property

Creates read-only property declaration.

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 helps implement it in one or all of them.

Initialize field from constructor parameter

Optionally creates and initializes field from constructor parameter.

Invert 'If' statement

Inverts guard condition of an If statement and swaps code in branches accordingly.

Iterate via 'For Each'

Works on an expression of System.ICollection type or other expression whose value can be iterated with For Each 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 assignment.

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 into a single If statement that checks conjunction of the original conditions.

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.

Optimize imports

Removes unused import directives.

Reverse assignment statement

Reverses source and destination parts of an assignment statement.

Specify type in local variable declaration

Explicitly specifies type in local variable declaration declared such as New something.

Split declaration list

Works on variable declaration statement that declares multiple variables. Splits such statement into multiple statements where each of them declares 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.

Split '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.

See Also

Procedures

Reference

External Links