Public Function OptionCheck_WithArray(ByRef n_Value1() As Integer, ByVal n_Value2 As Integer) As Boolean ' TODO: need to loop through array Return If((n_Value2 And n_Value1(0)) = n_Value1(0), True, False) End FunctionThis function will check if a 4 is in 102 (as an example).
result_0 = result_0.Where(Function(f) OptionCheck_WithArray(SecurityCodes, f.SecurityCode) = True)but that thoughts an error, don't remember the exact text, but the research of the error reviled that LINQ can not translate that into SQL.