Best way to compare two large string lists, using C# and LINQ? -


i have large list (~ 110,000 strings), need compare similar sized list.

list comes 1 system. list b comes sql table (i can read, no stored procs, etc)

what best way find values in list a, no longer exists in list b?

is 100,000 strings large number handled in array?

thanks

so have 2 lists so:

list<string> lista; list<string> listb; 

then use enumerable.except:

list<string> except = lista.except(listb).tolist(); 

note if want to, say, ignore case:

list<string> except = lista.except(listb, stringcomparer.ordinalignorecase).tolist(); 

you can replace last parameter iequalitycomparer<string> of choosing.


Comments

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -