VCCodeStruct.Functions 属性

定义

获取对象的函数集合。

public:
 property EnvDTE::CodeElements ^ Functions { EnvDTE::CodeElements ^ get(); };
[System.Runtime.InteropServices.DispId(579)]
public EnvDTE.CodeElements Functions { [System.Runtime.InteropServices.DispId(579)] [System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)] get; }
[<System.Runtime.InteropServices.DispId(579)>]
[<get: System.Runtime.InteropServices.DispId(579)>]
[<get: System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)>]
member this.Functions : EnvDTE.CodeElements
Public ReadOnly Property Functions As CodeElements

属性值

CodeElements

一个 CodeElements 集合。

属性

示例

此示例将检索所有全局函数的集合,并显示其名称。

[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  

适用于