Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

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)

[GuidAttribute("17730D4E-271F-11D7-8BF6-00B0D03DAA06")] 
public interface VCCodeParameter
/** @attribute GuidAttribute("17730D4E-271F-11D7-8BF6-00B0D03DAA06") */ 
public interface VCCodeParameter
GuidAttribute("17730D4E-271F-11D7-8BF6-00B0D03DAA06") 
public interface VCCodeParameter

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

NoteNote

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

See Samples for 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
        MsgBox(vcParam.DisplayName)
    Next
End Sub
Show:
© 2015 Microsoft