Convert to Procedure
In This Article
Converts a function that returns a value of any type, into a method that returns void. Selects the converted method name.
#Availability
From the context menus or via shortcuts:
- when the edit cursor or caret is on a function name within its declaration.
#Notes
- The code provider is only available for private methods.
- This code provider is the opposite of Convert to Function.
#Example
private int │TestMethod()
{
return;
}
Private Function │TestMethod() As Integer
Return
End Function
Result:
private void │TestMethod()
{
return;
}
Private Sub │TestMethod()
Return
End Sub