Projects 接口

定义

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

public interface class Projects : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("E3EC0ADD-31B3-461F-8303-8A5E6931257A")]
[System.Runtime.InteropServices.TypeLibType(4160)]
public interface Projects : System.Collections.IEnumerable
[<System.Runtime.InteropServices.Guid("E3EC0ADD-31B3-461F-8303-8A5E6931257A")>]
[<System.Runtime.InteropServices.TypeLibType(4160)>]
type Projects = interface
    interface IEnumerable
Public Interface Projects
Implements IEnumerable
属性
实现

示例

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  

注解

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

属性

Count

获取一个值,该值指示集合中的对象数 Projects

DTE

获取顶级扩展性对象。

Kind

获取指示对象种类或类型的 GUID 字符串。

Parent

获取集合的直接父对象 Projects

Properties

获取与集合相关的所有属性的集合 Projects

方法

GetEnumerator()

获取集合中项的枚举器。

Item(Object)

返回 Projects 集合的一个索引成员。

适用于