错误:表达式不会产生值

时间:2017-08-04 10:48:26

标签: .net vb.net

当我尝试连接组件时,我收到此错误:

  

表达式不会产生值。

代码:

Public Class Form1
    Sub DevComponents()
        Using DevComponents.DotNetBar()

        End Using
    End Sub
End Class

1 个答案:

答案 0 :(得分:0)

Your Using directive expects an object. Whatever DotNetBar() returns, it isn't an object. Here's an example:

Using resource As New resourceType   
    ' Insert code to work with resource.  
End Using  
相关问题