DTE2.ActiveSolutionProjects 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取当前选定项目的数组。
public:
property System::Object ^ ActiveSolutionProjects { System::Object ^ get(); };
public:
property Platform::Object ^ ActiveSolutionProjects { Platform::Object ^ get(); };
[System.Runtime.InteropServices.DispId(237)]
public object ActiveSolutionProjects { [System.Runtime.InteropServices.DispId(237)] get; }
[<System.Runtime.InteropServices.DispId(237)>]
[<get: System.Runtime.InteropServices.DispId(237)>]
member this.ActiveSolutionProjects : obj
Public ReadOnly Property ActiveSolutionProjects As Object
属性值
当前选定项目的数组。
实现
- 属性
示例
Sub ActiveSolutionProjectsExample()
Dim projs As System.Array
Dim proj As Project
projs = DTE2.ActiveSolutionProjects()
If projs.Length > 0 Then
proj = CType(projs.GetValue(0), EnvDTE.Project)
MsgBox(proj.UniqueName)
Else
MsgBox(projs.Length)
End If
End Sub