VCFilter.Files - свойство
Gets the collection of files associated with the filter.
Пространство имен: Microsoft.VisualStudio.VCProjectEngine
Сборка: Microsoft.VisualStudio.VCProjectEngine (в Microsoft.VisualStudio.VCProjectEngine.dll)
Синтаксис
'Декларация
ReadOnly Property Files As Object
'Применение
Dim instance As VCFilter
Dim value As Object
value = instance.Files
Object Files { get; }
property Object^ Files {
Object^ get ();
}
function get Files () : Object
Значение свойства
Тип: System.Object
An object representing the collection of files for the filter.
Заметки
See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.
Примеры
The following example uses the Files property on a VCFilter object in the integrated development environment (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
Разрешения
- Полное доверие для непосредственно вызывающего метода. Этот член не может быть использован частично доверенным кодом. Дополнительные сведения см. в разделе Using Libraries from Partially Trusted Code.