Nothing
first and use the AndAlso
keyword to stop it from evaluating the latter statement. Also, when checking if the and object is null, you should use the Is
or IsNot
operator rather than =
. This should workDim otherRecords As List(Of Objects) = listOf.Where(Function(x) _
(x.ID_NUM = newID) AndAlso _
(x.Codes IsNot Nothing) AndAlso _
(x.Codes.Contains(ddlPrimaryCode.SelectedItem.Text.Trim()))).ToList()
No comments:
Post a Comment