_DTE.ActiveSolutionProjects 屬性

取得目前所選取專案的陣列。

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

語法

'宣告
ReadOnly Property ActiveSolutionProjects As Object
    Get
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 命名空間