vendredi 24 avril 2015

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

I read a private field via reflection:

var parameters = typeof(HqlProvider).GetField("paramList", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(query);

And it works fine. I can put in a breakpoint and see everything. But when I try to cast parameters to what it is (an ArrayList) I get The non-generic type 'System.Collections.ArrayList' cannot be used with type arguments.

How can it not cast it to the thing that it is?





Aucun commentaire:

Enregistrer un commentaire