Use Equality Operator

Converts the Equals method call to an expression with the equality operator.

Availability

From the context menus or via shortcuts:

  • when an expression with the Equals method call is selected.

Example

bool c = a.Equals(b);
bool c = a.Equals(b);

Result:

bool c = a == b;
Dim c As Boolean = a = b