Freigeben über


VCCodeProperty Interface

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

Namespace:  Microsoft.VisualStudio.VCCodeModel
Assembly:  Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)

Syntax

<GuidAttribute("17730D5B-271F-11D7-8BF6-00B0D03DAA06")> _
Public Interface VCCodeProperty

Dim instance As VCCodeProperty
[GuidAttribute("17730D5B-271F-11D7-8BF6-00B0D03DAA06")]
public interface VCCodeProperty
[GuidAttribute(L"17730D5B-271F-11D7-8BF6-00B0D03DAA06")]
public interface class VCCodeProperty
public interface VCCodeProperty

Remarks

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

Hinweis

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

See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.

Examples

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 Also

Reference

VCCodeProperty Members

Microsoft.VisualStudio.VCCodeModel Namespace