Given the following class example:
class Foo<T> { void Bar<S>(T inputT, S inputS) { // Some really magical stuff here! } }
If I reflect on the Foo<>.Bar<>(...) method and study parameter types, let's say:
var argType1 = typeof(Foo<>).GetMethod("Bar").GetParameters()[0].ParameterType; var argType2 = typeof(Foo<>).GetMethod("Bar").GetParameters()[1].ParameterType;
both argType1 and argType2 look the same:
FullName property is nullName property is "T" or "S" respectivelyIsGenericParameter true
Is there anything in the parameter type information that allows me to distinguish the first argument from the type level, while the second argument is a method type parameter?
source share