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
Post a Comment