This documentation is archived and is not being maintained.

VCCodeParameter Object

Visual Studio .NET 2003

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

[Visual Basic .NET]
Public Interface VCCodeParameter
   Inherits IDispatch
[Visual Basic 6]
Class VCCodeParameter
[C++]
interface VCCodeParameter : IDispatch
[C#]
public interface VCCodeParameter : IDispatch
[JScript .NET]
public interface VCCodeParameter extends IDispatch

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.

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

Requirements

Namespace: Microsoft.VisualStudio.VCCodeModel

File: vcpkg.dll

Example

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

See Samples for Code Model Extensibility for information on how to compile and run this sample.

See Also

VCCodeParameter Object Properties, Methods, and Events | Visual C++ Extensibility Object Model

Show: