Share via


_DTE.ActiveSolutionProjects 属性

获取当前选定项目的数组。

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

语法

声明
ReadOnly Property ActiveSolutionProjects As Object
Object ActiveSolutionProjects { get; }
property Object^ ActiveSolutionProjects {
    Object^ get ();
}
abstract ActiveSolutionProjects : Object
function get ActiveSolutionProjects () : Object

属性值

类型:System.Object
当前选定项目的数组。

示例

Sub ActiveSolutionProjectsExample()
  ' Returns the name of the currently selected project in the solution.
  Dim projs As System.Array
  Dim proj As Project
  projs = DTE.ActiveSolutionProjects()
  If projs.Length > 0 Then
    proj = CType(projs.GetValue(0), EnvDTE.Project)
      MsgBox(proj.UniqueName)
    Else
      MsgBox(projs.Length)
  End If
End Sub

.NET Framework 安全性

请参见

参考

_DTE 接口

EnvDTE 命名空间