I made a function with an optional Boolean parameter.
I would like to test if the parameter was set or left blank in the function call, but apparently, when a boolean is not set, its value is still false.
I thought I could use the Nullable modifier in the function declaration but I tried all different forms of declaration:
Function myFunction (foo As Integer, Optional bar As Nullable(Of Boolean))
Function myFunction (foo As Integer, Optional bar As Boolean?)
Function myFunction (foo As Integer, Optional bar? As Boolean)
In all three cases I get a compile error saying that a list separator or ) is missing.
What would be the right syntax (or is it possible at all to do what I'm trying to do?)