Dim list1 As List(of String)= args(0)
Dim List2 As List(of String)= args(1)
Dim List0 As List(of String)
Dim st1 As String
Dim st2 As String
For Each st1 In List1
For Each st2 In List2
If st1=st2 Then
List0.Add (st1)
Exit For
End If
Next
Next
Return List0
下面是调用该自定义函数的代码:
其中,lis1、lis2是集合,里面确定有公共成员。
Dim li As List(of String)
li=Functions.Execute("List_PublicMembers",lis1,lis2)
错误信息:
.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2020.1.12.18
错误所在事件:自定义函数List_PublicMembers
详细错误信息:
调用的目标发生了异常。
未将对象引用设置到对象的实例。
请老师帮忙看看。谢谢!