typeof(List<>)
is an example where they differ. The property returns an empty array, while the method returns an array with a generic T
in it. (this T
has IsGenericParameter
true
)
From reading the documentation, I think that you can think of GenericTypeArguments
as GetGenericArguments().Where(t => !t.IsGenericParameter).ToArray()
, i.e. only the concrete types. See also ContainsGenericParameters
.