c# - How to Compare Two ArrayList -


how compare 2 arraylist ?

arraylist l1 = new arraylist(); l1.add(1); l1.add(2); 

and have arraylist same value .now want compare both.if both arraylist contains same value return true else false. there method without loop??

as mentioned in comments, can use list instead of arraylist , then:

l1.sequenceequal(l2); 

i'm assuming l2 name of second list. also, values need in same order in both lists sequenceequal return true.

more information here: http://msdn.microsoft.com/en-us/library/bb348567%28v=vs.110%29.aspx


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -