我想去抓取Class的function 然后在执行该function
ClassName 跟 FunctionName 都有正常传入值
目前 Type type = Type.GetType(ClassName); <= type = null
请问有哪个部分有问题 或有甚么方法可以抓到该class内的function
class 跟 function NAME 都是传入的
string ClassName = "TestQuartz";string FunctionName = "Test1";public class JobExecute : IJob{ public async Task Execute(IJobExecutionContext context) { var dataMap = context.JobDetail.JobDataMap; string ClassName = dataMap["ClassName"].ToString(); string FunctionName = dataMap["FunctionName"].ToString(); Type type = Type.GetType(ClassName); MethodInfo method = type.GetMethod(FunctionName); object obj = Activator.CreateInstance(type); await Task.Run(() => { method.Invoke(obj, null); }); }}public class TestQuartz{ public void Test1() { Console.WriteLine("Hello Quartz: Test1"); } public void Test2() { Console.WriteLine("Hello Quartz: Test2"); }}