using System.Diagnostics;
public static void Main()
TestClass test = new TestClass();
public static class TypeHelper
public static Type GetCallerType() => (new StackFrame(1).GetMethod() as MethodInfo)?.ReturnType;
Console.WriteLine(TypeHelper.GetCallerType());