表示给定对象的属性一般集合中的一个属性。
命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)
语法
声明
<GuidAttribute("7B988E06-2581-485E-9322-04881E0600D0")> _
Public Interface Property
[GuidAttribute("7B988E06-2581-485E-9322-04881E0600D0")]
public interface Property
[GuidAttribute(L"7B988E06-2581-485E-9322-04881E0600D0")]
public interface class Property
[<GuidAttribute("7B988E06-2581-485E-9322-04881E0600D0")>]
type Property =  interface end
public interface Property
Property 类型公开以下成员。
属性
| 名称 | 说明 | |
|---|---|---|
![]()  | 
Application | 基础结构。仅由 Microsoft 内部使用。 | 
![]()  | 
Collection | 获取包含支持此属性的 Property 对象的 Collection。 | 
![]()  | 
DTE | 获取顶级扩展性对象。 | 
![]()  | 
IndexedValue | 返回列表的一个元素。 | 
![]()  | 
Name | 获取对象的名称。 | 
![]()  | 
NumIndices | 获取访问值所需的索引数目。 | 
![]()  | 
Object | 设置或获取支持 Property 对象的对象。 | 
![]()  | 
Parent | 基础结构。仅由 Microsoft 内部使用。 | 
![]()  | 
Value | 获取或设置由 Property 对象返回的属性的值。 | 
页首
方法
| 名称 | 说明 | |
|---|---|---|
![]()  | 
let_Value | 设置属性值的 Setter 函数。 | 
页首
示例
' Visual Studio macro.
Sub PropertyExample()
   Dim Props As Properties
   Dim PropObj As [Property]
   Dim NameValPair As String
        
   Props = DTE.Properties("Environment", "General")
   MsgBox("Tools – Options – Environment – General Properties Count _
   = " & Props.Count())
   For Each PropObj In Props
     NameValPair = NameValPair & (PropObj.Name & "Value = " & _
     PropObj.Value & microsoft.VisualBasic.ControlChars.CrLf)
   Next
   MsgBox(NameValPair)
End Sub
.gif)
.gif)