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)
Syntax
<GuidAttribute("17730D4E-271F-11D7-8BF6-00B0D03DAA06")> _
Public Interface VCCodeParameter
Dim instance As VCCodeParameter
[GuidAttribute("17730D4E-271F-11D7-8BF6-00B0D03DAA06")]
public interface VCCodeParameter
[GuidAttribute(L"17730D4E-271F-11D7-8BF6-00B0D03DAA06")]
public interface class VCCodeParameter
public interface VCCodeParameter
Remarks
The VCCodeParameter object represents the formal parameters of a function definition in a source file, allowing access to the properties of the parameter list.
Hinweis
A large part of the functionality of this object is provided by the Visual StudioCodeParameter 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.
Examples
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