score:2

Accepted answer

the difference between iqueryable and iqueryable<t> is that the second is typed while the first is not. to convert iqueryable into iqueryable<t> you can use the cast<t>() method.

iqueryable myqueryable = ...;
iqueryable<mytype> mytypedqueryable = myqueryable.cast<myqueryable>();
ilist<mytype> mylist = mytypedqueryable.tolist();

obviously the contents of myqyeryable must be castable into mytype. to select the instances of a certain type you can use the typeof<t>() method before doing the cast.


Related Query

More Query from same tag