void Func1(System.Type type)
{
MyFunc2<type>();
}
public class BarType
{ }
public class Foo
{
public static string Bar<T>() => $"Bar() is called with generic: {typeof(T).FullName}";
}
Type type = typeof(Foo);
MethodInfo mi = type.GetMethods().Single(m => m.Name == "Bar" && m.IsGenericMethodDefinition);
MethodInfo genericMi = mi.MakeGenericMethod(typeof(BarType));
object result = genericMi.Invoke(null, []);
Console.WriteLine($"Result: {result}");
>> Result: Bar() is called with generic: Example.App+BarType