Suppose I have a generic type definition as such:
var type = typeof(IReadOnlyDictionary<,>)
How would I get the typeparam name of the generic arguments? In the example above, I'm looking for "TKey"
and "TValue"
for typeof(IList<>)
I am expecting "T"
Is there any way, using reflection, to get these strings?
Aucun commentaire:
Enregistrer un commentaire