参数计数不匹配?
Dim parts() As String = _callbackEventArgument.Split("|")
Dim result As String = ""
Dim args() As Object = Nothing
If parts.Length > 1 Then
ReDim args(parts.Length - 2)
Array.Copy(parts, 1, args, 0, args.Length)
End If
Dim method As MethodInfo = Me.GetType().GetMethod(parts(0))
If Not method Is Nothing Then
result = method.Invoke(Me, args)
End If
Return result
执行到result = method.Invoke(Me, args)时,出错提示"参数计数不匹配"
如果callbackEventArgument="FillProduct|aaa"则正确,
如果callbackEventArgument="FillProduct|aaa|bbb"会出现以上的错误信息.
问题点数:100、回复次数:5Top
1 楼yuanarea(Sail before)回复于 2006-03-10 13:01:21 得分 50
仔细检查一下你的方法.
或者把你的Method声明贴出来Top
2 楼lookmai(花上飞)回复于 2006-03-10 17:10:30 得分 0
Public Function FillProduct(ByVal args As String) As StringTop
3 楼lookmai(花上飞)回复于 2006-03-10 17:11:25 得分 0
换成
Public Function FillProduct(ByVal args() As String) As String
也不行Top
4 楼lookmai(花上飞)回复于 2006-03-10 17:16:07 得分 0
MethodInfo是System.Reflection.MethodInfo
类Top
5 楼sz_lgp(longguoping)回复于 2006-03-10 17:47:17 得分 50
Method方法?
有没有相应的委托?Top




