criteria.List(new YourList<T>());

2009/6/11 darren <[email protected]>

>
> I am trying to find a way to have the List method fill a generic list
> without using the List<T> signature.  The lists I am using are generic
> typed lists but are created dynamically at runtime using reflection.
>
> Here's a snippet
>
> ICriteria cr = session.CreateCriteria(objType);
> var objList = Activator.CreateInstance(typeof(List<>).MakeGenericType
> (objType)) as IList;
> cr.List(objList);
>
> This throws a type conversion exception in one of the ArrayHelper
> methods.
>
> I'm trying to avoid having to do an extra array copy for every List
> call.
>
>
>
>
> >
>


-- 
Fabio Maulo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to