Is it possible to get generic type arguments from within the executed generic method without directly referencing them (i.e. typeof(T0))? For example:
public static List<(T0?, T1?, T2?, T3?, T4?)> ParseParameter<T0, T1, T2, T3, T4>(this JArray array, params string[] columnCodesCaseIndependent)
{
var genericArgs = MethodBase.GetCurrentMethod()!.GetGenericArguments();
// ...
return result;
}
Testing the above in debugger I see:
- {Name="T0", FullName=null}
- same as above for the rest
So the types are not the ones actually used. net5.0