Projects 接口

表示给定种类的所有项目。

命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)

语法

声明
<GuidAttribute("E3EC0ADD-31B3-461F-8303-8A5E6931257A")> _
Public Interface Projects _
    Inherits IEnumerable
[GuidAttribute("E3EC0ADD-31B3-461F-8303-8A5E6931257A")]
public interface Projects : IEnumerable
[GuidAttribute(L"E3EC0ADD-31B3-461F-8303-8A5E6931257A")]
public interface class Projects : IEnumerable
[<GuidAttribute("E3EC0ADD-31B3-461F-8303-8A5E6931257A")>]
type Projects =  
    interface 
        interface IEnumerable 
    end
public interface Projects extends IEnumerable

Projects 类型公开以下成员。

属性

  名称 说明
公共属性 Count 获取指示 Projects 集合中的对象数的值。
公共属性 DTE 获取顶级扩展性对象。
公共属性 Kind 获取一个指示对象种类或类型的 GUID 字符串。
公共属性 Parent 获取 Projects 集合的直接父对象。
公共属性 Properties 获取属于 Projects 集合的所有属性的集合。

页首

方法

  名称 说明
公共方法 GetEnumerator 获取集合中项的枚举数。
公共方法 Item 返回 Projects 集合的一个索引成员。

页首

备注

Projects 集合表示集成开发环境 (IDE) 的当前实例中所有属于同一种类的项目。 通常,此集合后期绑定到 DTE 对象。

示例

Sub ProjectsExample()
    ' Before running, be sure you have one or more projects
    ' loaded in the solution.
    Dim prj As Project
    Dim prjs As Projects
    Dim msg As String

    ' Go through all of the projects in the solution and display
    ' their names and types.
    prjs = DTE.Solution.Projects
    For Each prj In prjs
        msg += "NAME: " & prj.Name & "TYPE: " & prj.Kind & vbCr
    Next
    MsgBox(msg)
End Sub

请参阅

参考

EnvDTE 命名空间

其他资源

控制项目和解决方案