'Simple case - select all items that have specific enum set: Dim result_Match = _ (From x In results Where x.SecurityCodes.HasFlag(e_SecurityCodes.DMS_Accounting_AP) Select x).ToList() 'or if the items need more than one enum match: result_Match = _ (From x In results Where x.SecurityCodes.HasFlag(e_SecurityCodes.DMS_Accounting_AP Or e_SecurityCodes.DMS_Client) Select x).ToList() 'But use an extension method if you want to select items which contain any one of a given list: Dim param As e_SecurityCodes = e_SecurityCodes.DMS_Accounting_AP Or e_SecurityCodes.DMS_Client Dim result_Match = (From x In results Where x.SecurityCodes.IncludesAnyOf(param) Select x).ToList()where extension method is:
'Extension method <System.Runtime.CompilerServices.Extension()> _ Public Function IncludesAnyOf(ByVal sc As e_SecurityCodes, ByVal DocSecurityValue As e_SecurityCodes) As Boolean Dim code As e_SecurityCodes For Each code In [Enum].GetValues(GetType(e_SecurityCodes)) If sc.HasFlag(code) And DocSecurityValue.HasFlag(code) Then Return True End If Next Return False End FunctionHope this makes more sense :-}