مشاركة عبر


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("EDA77486-28EC-4BD9-A73C-161B355203BB")> _
Public Interface VCCodeParameter
'الاستخدام
Dim instance As VCCodeParameter
[GuidAttribute("EDA77486-28EC-4BD9-A73C-161B355203BB")]
public interface VCCodeParameter
[GuidAttribute(L"EDA77486-28EC-4BD9-A73C-161B355203BB")]
public interface class VCCodeParameter
[<GuidAttribute("EDA77486-28EC-4BD9-A73C-161B355203BB")>]
type VCCodeParameter =  interface end
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.

ملاحظة

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.

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

See Also

Reference

VCCodeParameter Members

Microsoft.VisualStudio.VCCodeModel Namespace