i have this code:
List apps = getApps();
List ids;
List dropdown = apps.ConvertAll(c => new
You should be referencing Selected not ids.Contains as the last line.
I just realized this is a formatting issue, from the OP. Regardless you should be referencing the value in Selected. I recommend adding some Console.WriteLine calls to see exactly what is being printed out on each line and also what each value is.
After your update: ids is an empty list, how is this not throwing a NullReferenceException? As it was never initialized in that code block