Using vb.net the following code throws a null pointer exception but the expression should guarantee that match
is not null.
repeater.DataSource = IIf(collection IsNot Nothing AndAlso match IsNot Nothing, collection.FindAll(match), collection)
Replacing this with regular if-else construct no error is thrown:
If collection IsNot Nothing AndAlso match IsNot Nothing Then
repeater.DataSource = collection.FindAll(match)
Else
repeater.DataSource = collection
End If
Are both path's evaluated in an ternary operator?