Imports System Public Module Module1 Public Sub Main() Dim result = Coalesce(Nothing, "fds", "e") Console.WriteLine(result) End Sub ''' ''' Return the first non-nothing value in a list ''' ''' ''' Public Function Coalesce(ByVal ParamArray g() As Object) AS Object For Each o As Object In g If Not o is Nothing Then Return o End if Next Return Nothing End Function End Module