Use Implicit Typecast

Converts an explicit typecast into an implicit.

Notes

Availability

From the context menus or via shortcuts:

  • when the edit cursor or caret is on an explicit typecast expression.

Example

string str = (string)param1;
Dim str As String = CType(param1, String)

Result:

string str = param1 as string;
Dim str As String = IIf(TypeOf param1 Is String, CType(param1, String), Nothing)