VCCodeInterface.Functions 属性

获取对象的函数集合。

命名空间:  Microsoft.VisualStudio.VCCodeModel
程序集:  Microsoft.VisualStudio.VCCodeModel(在 Microsoft.VisualStudio.VCCodeModel.dll 中)

语法

声明
ReadOnly Property Functions As CodeElements
CodeElements Functions { get; }
property CodeElements^ Functions {
    CodeElements^ get ();
}
abstract Functions : CodeElements with get
function get Functions () : CodeElements

属性值

类型:CodeElements
一个 CodeElements 集合。

备注

有关如何编译和运行此示例的信息,请参见 如何:编译 Visual C++ 代码模型扩展性的示例代码

示例

此示例检索所有全局函数的集合并显示它们的名称。

[Visual Basic]

Sub GetGlobalFunctions()
    Dim vcElement As VCCodeElement
    Dim vcElements As VCCodeElements
    vcElements = DTE.Solution.Item(1).CodeModel.Functions
    For Each vcElement In vcElements
        MsgBox(vcElement.DisplayName)
    Next
End Sub

.NET Framework 安全性

请参阅

参考

VCCodeInterface 接口

Microsoft.VisualStudio.VCCodeModel 命名空间