Export (0) Print
Expand All

VCCodeParameter Interface

An object representing a parameter of a function, property, and so on, in a source file.

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

public interface VCCodeParameter

The VCCodeParameter type exposes the following members.

Public propertyAttributesGets a collection of all of the attributes for the parent object.
Public propertyChildrenGets a collection of objects contained within this code construct.
Public propertyCodeModelGets the VCCodeModel object for the project.
Public propertyCollectionGets the collection containing the object supporting this property or contained within this code construct.
Public propertyDefaultExpressionGets or sets an object defining the initialization code for an element.
Public propertyDisplayNameGets the name used in the user interface for this output group.
Public propertyDocCommentGets or sets the document comment for the current code model element.
Public propertyDTEGets the top-level extensibility object.
Public propertyEndPointGets the edit point that is the location of the end of the code item.
Public propertyEndPointOfGets the end point of the parent object.
Public propertyExtenderGets the requested Extender object if it is available for this object.
Public propertyExtenderCATIDGets the Extender category ID (CATID) for the object.
Public propertyExtenderNamesGets a list of available Extenders for the object.
Public propertyFileGets the file where this object is defined.
Public propertyFullNameGets the full path and name of the object's file.
Public propertyIndexGets the position of a parameter in a parameter list.
Public propertyInfoLocationDescribes the capabilities of the code model.
Public propertyIsCaseSensitiveDetermines if a code element is case-sensitive.
Public propertyIsCodeTypeGets a value indicating whether a CodeType object can be obtained from this object.
Public propertyIsConstantGets or sets a value to describe whether this item is a constant.
Public propertyIsInjectedGets if a code element has been injected by an attribute or macro expansion.
Public propertyIsReadOnlyGets a value that indicates whether the file containing the object is read-only.
Public propertyIsVolatileGets or sets a value indicating whether the volatile keyword is used.
Public propertyIsZombieDetermines if the object exists.
Public propertyKindGets an enumeration indicating the type of object.
Public propertyLanguageGets the programming language used to author the code.
Public propertyLocationGets the location of the object declaration.
Public propertyNameGets or sets the name of the object.
Public propertyParentGets the immediate parent object of a given object.
Public propertyPictureGets a picture automation object to be used as an icon in the user interface.
Public propertyProjectGets the Project object associated with the object.
Public propertyProjectItemGets the ProjectItem object associated with the given object.
Public propertyStartPointReturns a TextPoint object that defines the beginning of the code item.
Public propertyStartPointOfGets the start point of the object.
Public propertyTypeGets or sets an object representing the programmatic type.
Public propertyTypeStringGets or sets the type of the object using a string representation of the type.

Public methodAddAttributeCreates a new attribute code construct and inserts the code in the correct location.
Public methodGetEndPointGets a TextPoint object that marks the end of the code element definition.
Public methodGetStartPointGets a TextPoint object that defines the beginning of the code element definition.
Public methodIsSelfDetermines if the specified code element is the same as the code element.

The VCCodeParameter object represents the formal parameters of a function definition in a source file, allowing access to the properties of the parameter list.


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

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

This example retrieves all parameters in the first global function of a solution and displays the name of each.

Sub GetFunctionParams()
    Dim vcCM as VCCodeModel
    Dim vcFunc as VCCodeFunction
    Dim vcParam as VCCodeParameter
    vcCM = DTE.Solution.Item(1).CodeModel
    vcFunc = vcCM.Functions.Item(1)
    For Each vcParam in vcFunc.Parameters
End Sub

Community Additions

© 2014 Microsoft