共用方式為


VCFilter.Files 屬性

取得集合的篩選器相關聯的檔案。

命名空間:  Microsoft.VisualStudio.VCProjectEngine
組件:  Microsoft.VisualStudio.VCProjectEngine (在 Microsoft.VisualStudio.VCProjectEngine.dll 中)

語法

'宣告
ReadOnly Property Files As Object
Object Files { get; }
property Object^ Files {
    Object^ get ();
}
abstract Files : Object with get
function get Files () : Object

屬性值

型別:System.Object
表示的檔案篩選條件集合的物件。

備註

請參閱HOW TO:編譯專案模型擴充性的範例程式碼如需有關如何編譯及執行這個範例資訊。

範例

下列範例會使用Files屬性在VCFilter在整合式的開發環境 (IDE) 中的物件:

' Macro code.
' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim idx, idx2 As Integer
        Dim file As VCFile
        Dim filter As VCFilter
        Dim col, col2 As IVCCollection
        Dim prj As VCProject
        prj = DTE.Solution.Projects.Item(1).Object
        col = prj.Filters
        For idx = 1 To col.Count
            filter = col.Item(idx)
            ' filter.Name has name of the folder
            col2 = filter.Files
            For idx2 = 1 To col2.Count
                file = col2.Item(idx2)
                ' file.Name has name of file
            Next
        Next
    End Sub
End Module

.NET Framework 安全性

請參閱

參考

VCFilter 介面

Microsoft.VisualStudio.VCProjectEngine 命名空間