Find an element in List of List, c#
Posted
by
Sandy
on Stack Overflow
See other posts from Stack Overflow
or by Sandy
Published on 2010-12-31T22:30:25Z
Indexed on
2010/12/31
22:54 UTC
Read the original article
Hit count: 158
c#
Hi,
I have a list of lists as below:
List<List <T> > userList
Class T { string uniqueidentifier, string param2, int param2}
I have a uniqueidentifier and i need to find the element T in the list that has the same 'uniqueidentifier' value.
I can do it using two 'foreach' loops. This does not seem to be nice way doing things. I guess there should be some inbuilt method like 'Find' that does the same thing and is highly optimized.
© Stack Overflow or respective owner