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)

Syntax

'Declaration
<GuidAttribute("4CC8CCF5-A926-4646-B17F-B4940CAED472")> _
Public Interface Properties _
    Inherits IEnumerable
[GuidAttribute("4CC8CCF5-A926-4646-B17F-B4940CAED472")]
public interface Properties : IEnumerable
[GuidAttribute(L"4CC8CCF5-A926-4646-B17F-B4940CAED472")]
public interface class Properties : IEnumerable
[<GuidAttribute("4CC8CCF5-A926-4646-B17F-B4940CAED472")>]
type Properties =  
    interface 
        interface IEnumerable 
    end
public interface Properties extends IEnumerable

The Properties type exposes the following members.

Properties

  Name Description
Public property Application Infrastructure. Microsoft Internal Use Only.
Public property Count Gets a value indicating the number of objects in the collection.
Public property DTE Gets the top-level extensibility object.
Public property Parent Gets the immediate parent object of a Properties collection.

Top

Methods

  Name Description
Public method GetEnumerator Gets an enumeration for items in a collection.
Public method Item Returns an indexed member of a Properties collection.

Top

Remarks

Properties contains properties of various kinds. It can contain project properties, item properties, solution properties, and so on. It is used in the properties of other interfaces, such as Properties, to contain their property lists.

In the case of Properties, Properties represents all of the available categories and subcategories that are contained in the Options dialog box on the Tools menu. See Properties, for more information.

Properties is also used to represent things such as properties for projects, properties for items in projects, properties for project configurations, and so on. For more information, see Accessing Project Type Specific Project, Project Item, and Configuration Properties.

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.

Examples

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

See Also

Reference

EnvDTE Namespace