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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

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