共用方式為


VCCodeIDLLibrary.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

屬性值

型別:EnvDTE.CodeElements
CodeElements 集合。

備註

如需這個範例的編譯與執行等詳細資訊,請參閱 HOW TO:編譯 Visual C++ 程式碼模型擴充性的範例程式碼

範例

本範例會擷取所有的全域函式的集合,並顯示其名稱。

    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 安全性

請參閱

參考

VCCodeIDLLibrary 介面

Microsoft.VisualStudio.VCCodeModel 命名空間