This documentation is archived and is not being maintained.

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
interface VCCodeProperty : IDispatch
public interface VCCodeProperty : IDispatch
[JScript .NET]
public interface VCCodeProperty extends IDispatch


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.


Namespace: Microsoft.VisualStudio.VCCodeModel

File: vcpkg.dll


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
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