Export (0) Print
Expand All

VCCodeProperty Object

Visual Studio .NET 2003

An object representing a property code element (declared with the __property keyword).

[Visual Basic .NET]
Public Interface VCCodeProperty
   Inherits IDispatch
[Visual Basic 6]
Class VCCodeProperty
[C++]
interface VCCodeProperty : IDispatch
[C#]
public interface VCCodeProperty : IDispatch
[JScript .NET]
public interface VCCodeProperty extends IDispatch

Remarks

The VCCodeProperty object represents a property code element in a source file, allowing access to information about that specific code element.

Note   A large part of the functionality of this object is provided by the Visual Studio CodeProperty object. For more information, see CodeProperty object.

Requirements

Namespace: Microsoft.VisualStudio.VCCodeModel

File: vcpkg.dll

Example

This example retrieves all properties of the first class and displays their names in a message box.

Sub GetProperties()
    Dim vcCM As VCCodeModel
    Dim vcClass As VCCodeClass
    Dim vcProperty as VCCodeProperty
    vcCM = DTE.Solution.Item(1).CodeModel
    vcClass = vcCM.Classes.Item(1)
    For Each vcProperty in vcClass.Properties
        MsgBox(vcProperty.DisplayName)
    Next
End Sub

See Samples for Code Model Extensibility for information on how to compile and run this sample.

See Also

VCCodeProperty Object Properties, Methods, and Events | Visual C++ Extensibility Object Model

Show:
© 2014 Microsoft