Property 介面
更新:2007 年 11 月
代表指定物件在泛用屬性集合當中的某一項屬性。
命名空間: EnvDTE
組件: EnvDTE (在 EnvDTE.dll 中)
語法
<GuidAttribute("7B988E06-2581-485E-9322-04881E0600D0")> _
Public Interface Property
Dim instance As [Property]
[GuidAttribute("7B988E06-2581-485E-9322-04881E0600D0")]
public interface Property
[GuidAttribute(L"7B988E06-2581-485E-9322-04881E0600D0")]
public interface class Property
public interface Property
範例
' 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