9
Answers

Except issues with List Object

Desi Gal

Desi Gal

13y
3.1k
1
I have two lists:

 List< object > totalkeys = GridView.GetCurrentPageRowValues("StudentId", "CourseId");
 List< object > selectedkeys = GridView.GetSelectedFieldValues("StudentId", "CourseId");

I have two lists one with the total keys and the other list with selected keys.
I want to have a third list with unselected keys.

So I am trying to use this piece of code without any success.

List < object > unselectedkeys = totalkeys.Except(selectedkeys);

Am I missing anything?
Any other suggestions ?

Thanks


Answers (9)