Hi,
If we call a VB method that can have optional parameters, the syntax error reports an issue and puts the error squiggles under the code even though it compiles and can run.
Public Class TestSyntaxParse
Private Function MethodWithOptionalParamaters(Optional parameter1 As String = "", Optional parameter2 As String = "", Optional parameter3 As String = "")
Return True
End Function
Private Function TestMethodWithOptionalParameters
Return MethodWithOptionalParamaters(, , ,)
End Function
End Class
The syntax error will highlight the following line with this issue:
Return MethodWithOptionalParamaters(, , ,)
The syntax error is : "')' expected".
Thanks
Gavin
[Modified 1 year ago]