共用方式為


Property 介面

代表指定物件在泛用屬性集合當中的某一項屬性。

命名空間:  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

請參閱

參考

EnvDTE 命名空間