Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Module Program
Sub Main()
Dim i As Integer? = If(False, 1, Nothing)
Console.WriteLine(i)
Dim operation As Func(Of Integer, Integer, Integer) =
If(True,
AddressOf Add,
AddressOf Subtract)
End Sub
Function Add(left As Integer, right As Integer) As Integer
Return left + right
End Function
Function Subtract(left As Integer, right As Integer) As Integer
Return left - right
End Function
End Module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment