方法未找到例外

时间:2016-03-22 13:59:59

标签: c# vb.net exception

编辑:异常错误我在尝试调用父方法时遇到错误,这在以前从未发生过。

我正在调用其他类中的函数从ItemSet

中检索Microsoft.TeamFoundation.VersionControl.Client.dll

c#中调用部分:

ItemSet itemsSet  = GetItemSet(variable1, variable2);
string stringSet = GetStringSet(variable1, variable2);

vb.net中的方法:

Public Function GetStringSet(ByVal variable1 As String, ByVal variable2 As String) As String
    Return variable1 + variable2
End Function

'以下方法是trowing exception

Public Function GetItemSet(ByVal variable1 As String, ByVal variable2 As String) As ItemSet
    Dim items As ItemSet = somelocal function to get ItemSet which works
    Return items
End Function
  1. Bin文件夹已cleaned
  2. 多次
  3. Cleanedrebuild
  4. 之后添加了
  5. String function,以检查是否有可能使用旧版dll
  6. 字符串一个很好用,在ItemSet itemsSet = GetItemSet(variable1, variable2);未注释的情况下,我甚至无法进入父方法。
  7. 为什么会出现这种情况的任何想法?

1 个答案:

答案 0 :(得分:0)

您尚未正确声明功能请尝试以下功能


Public Function GetStringSet(ByVal variable1 As String, ByVal variable2 As String) As String
    Return variable1 & variable2
End Function

Public Function GetItemSet(ByVal variable1 As String, ByVal variable2 As String) As ItemSet
    Dim items As ItemSet = somelocal function to get ItemSet which works
    Return items
End Function