c# - The non-generic type 'System.Collections.ArrayList' cannot be used with type arguments -


i read private field via reflection:

var parameters = typeof(hqlprovider).getfield("paramlist", bindingflags.nonpublic | bindingflags.instance).getvalue(query); 

and works fine. can put in breakpoint , see everything. when try cast parameters (an arraylist) the non-generic type 'system.collections.arraylist' cannot used type arguments.

how can not cast thing is?

arraylist not generic , implements no generic interfaces need cast non-generic versions e.g.

var al = (arraylist)parameters var l = (system.collections.ilist)parameters 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -