M
M.H.
I have List<T> with about 6000-7000 objects.
I need to select all objects that the property Name starts with
SearchText.
This is the code
foreach (T item in myList)
if (item.Name.StartsWith(SearchText))
myResults.Add(item);
It takes about 5-6 seconds and my users are not happy with the speed.
How to improve it?
I tried "for (int.." but the result was the same.
Thanks
MH
I need to select all objects that the property Name starts with
SearchText.
This is the code
foreach (T item in myList)
if (item.Name.StartsWith(SearchText))
myResults.Add(item);
It takes about 5-6 seconds and my users are not happy with the speed.
How to improve it?
I tried "for (int.." but the result was the same.
Thanks
MH