New analyzer:
VB only: convert assignment to function name to return statement.
Before:
Public function f(s As String) As Integer
f = s.Count()
End Function
After:
Public function f(s As String) As Integer
Return s.Count()
End Function
The purpose is to avoid the risk of mistyping the function name and accidentally assigning the value to some unrelated field or property.
Diagnostic Id: CC0114
Category: Style
Severity: Info
New analyzer:
VB only: convert assignment to function name to return statement.
Before:
After:
The purpose is to avoid the risk of mistyping the function name and accidentally assigning the value to some unrelated field or property.
Diagnostic Id:
CC0114Category:
StyleSeverity:
Info