Click here to Skip to main content
15,897,518 members

Comments by Andreas Blohm (Top 1 by date)

Andreas Blohm 26-Jul-12 4:46am View    
Reason for my vote of 1
1. Your code DOES NOT WORK. imagine you have the value 1000 in the list, your search will find 100 even if it is not contained in the list.

2. Your codes does not work for complex types.

3. Converting a big list into a string adds unnecessary memory and CPU overhead to the operation.

4. The IList interface has the Contains method that does exactly what you are looking for... just use it!