当我将方法的调用用作 MethodInfo 类型时,我的声明存在问题:
错误信息:
object reference not set to an instance of an object.
Dim oMethod As MethodInfo
oMethod = _StepInfo.CurrSysType.GetMethod(Me._MethodToRun, _MemberAccess)
'calling method on object by reflection
Dim dStart As DateTime = DateTime.Now
Dim iRes As Integer = 0
iRes = CInt(oMethod.Invoke(_StepInfo.CurrObj, Nothing))
Dim dEnd As DateTime = DateTime.Now
System.Diagnostics.Debug.WriteLine("Processing Object: " & (dEnd - dStart).TotalMilliseconds) </i>