i have this code:
List apps = getApps();
List ids;
List dropdown = apps.ConvertAll(c => new
As long as your list is initialized with values and that value actually exists in the list, then Contains should return true.
I tried the following:
var list = new List<int> {1,2,3,4,5};
var intVar = 4;
var exists = list.Contains(intVar);
And exists is indeed set to true.
If you just need a true/false result
bool isInList = intList.IndexOf(intVariable) != -1;
if the intVariable does not exist in the List it will return -1