Use Implicit Typecast
In This Article
Converts an explicit typecast into an implicit.
#Notes
- The Use Implicit Typecast code provider is the functional opposite of Use Explicit Typecast.
#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)