Поделиться через


VCProject.RemoveFilter - метод

Removes a folder from the current project and any files or other folders in the folder.

Пространство имен:  Microsoft.VisualStudio.VCProjectEngine
Сборка:  Microsoft.VisualStudio.VCProjectEngine (в Microsoft.VisualStudio.VCProjectEngine.dll)

Синтаксис

'Декларация
Sub RemoveFilter ( _
    Filter As Object _
)
'Применение
Dim instance As VCProject
Dim Filter As Object

instance.RemoveFilter(Filter)
void RemoveFilter(
    Object Filter
)
void RemoveFilter(
    [InAttribute] Object^ Filter
)
function RemoveFilter(
    Filter : Object
)

Параметры

Заметки

The contents of the Resource Files folder, including the contents of any subfolders under Resource Files, will also be removed from the project.

Примеры

See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.

The following example uses RemoveFilter in the integrated development environment (IDE):

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

Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim MyCol As IVCCollection
        Dim filter As VCFilter
        prj = DTE.Solution.Projects.Item(1).Object
        MyCol = prj.Filters
        filter = MyCol.Item("Resource Files")
        prj.RemoveFilter(filter)
    End Sub
End Module

Разрешения

  • Полное доверие для непосредственно вызывающего метода. Этот член не может быть использован частично доверенным кодом. Дополнительные сведения см. в разделе Using Libraries from Partially Trusted Code.

См. также

Ссылки

VCProject Интерфейс

VCProject - члены

Microsoft.VisualStudio.VCProjectEngine - пространство имен