Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Properties Interface

Contains all of the properties of a given object that are contained in a generic collection of properties.

Namespace: EnvDTE
Assembly: EnvDTE (in envdte.dll)

[GuidAttribute("4CC8CCF5-A926-4646-B17F-B4940CAED472")] 
public interface Properties : IEnumerable
/** @attribute GuidAttribute("4CC8CCF5-A926-4646-B17F-B4940CAED472") */ 
public interface Properties extends IEnumerable
GuidAttribute("4CC8CCF5-A926-4646-B17F-B4940CAED472") 
public interface Properties extends IEnumerable

The Properties collection does not support statement completion, such as property members of objects. However, it does provide an easy way to expose many properties and iterate through them.

Sub PropertiesExample()
   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

Community Additions

ADD
Show:
© 2015 Microsoft