c# - How can I convert a generic List<T> to a List? -
how can convert generic list list?
i using listcollectionview
, need provide ilist
not ilist<t>
.
i see plenty of examples convert ilist
ilist<t>
, not other way.
do convert manually (new list().addrange(ilist<t>
)?
as list<t>
implements ilist
interface, can provide list<t>
. if needed, cast it:
list<int> list = new list<int>(); ilist ilist = (ilist)list;
Comments
Post a Comment