共用方式為


Properties 介面

更新:2007 年 11 月

包含指定物件在泛用屬性集合中的所有屬性。

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

語法

<GuidAttribute("4CC8CCF5-A926-4646-B17F-B4940CAED472")> _
Public Interface Properties _
    Implements IEnumerable

Dim instance As Properties
[GuidAttribute("4CC8CCF5-A926-4646-B17F-B4940CAED472")]
public interface Properties : IEnumerable
[GuidAttribute(L"4CC8CCF5-A926-4646-B17F-B4940CAED472")]
public interface class Properties : IEnumerable
public interface Properties extends IEnumerable

備註

Properties 是一種存放各種屬性的泛型容器,其中可以包含專案屬性、項目屬性、方案屬性等。它是在其他介面的屬性 (例如 Properties()) 中用來包含這些界面的屬性清單。

對於 Properties(),Properties 代表 [工具] 功能表的 [選項] 對話方塊中包含的所有可用分類和子分類。如需詳細資訊,請參閱 Properties()。

Properties 也可用來表示如專案屬性、專案中的項目屬性、專案組態的屬性等事物。如需詳細資訊,請參閱存取專案類型特定專案、專案項目和組態屬性

Properties 集合不支援陳述式完成,例如物件的屬性成員。但是會提供簡單的方法公開並逐一查看許多屬性。

範例

Sub PropertiesExample()
   ' Demonstrates how to programmatically access Tools Options 
   ' properties using the Properties collection.
   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

請參閱

參考

Properties 成員

EnvDTE 命名空間