Reference.Remove 方法

從包含參考的 References 物件中取得參考。

命名空間: VSLangProj
組件: VSLangProj (在 vslangproj.dll 中)

語法

'宣告
'用途

範例

此範例將新增參考,再將之移除。

' Macro Editor
Imports VSLangProj
Public Sub TestReport()
   ' First project is a Visual Basic or C# project.
   Dim vsProject As VSProject = _
      CType(DTE.Solution.Projects.Item(1).Object, VSProject)
        
   ' Add an assembly and display its type, "Assembly".
   Dim newRef As Reference
   newRef = vsProject.References.Add("C:\SomeProject\bin\template.dll")
   newRef.Remove()
End Sub

請參閱

參考

Reference 介面
Reference 成員
VSLangProj 命名空間