다음을 통해 공유


VCFilter.RemoveFile 메서드

파일에서 현재 필터를 제거합니다.

네임스페이스:  Microsoft.VisualStudio.VCProjectEngine
어셈블리:  Microsoft.VisualStudio.VCProjectEngine(Microsoft.VisualStudio.VCProjectEngine.dll)

구문

‘선언
Sub RemoveFile ( _
    File As Object _
)
void RemoveFile(
    Object File
)
void RemoveFile(
    [InAttribute] Object^ File
)
abstract RemoveFile : 
        File:Object -> unit 
function RemoveFile(
    File : Object
)

매개 변수

  • File
    형식: System.Object
    필수 요소.제거할 파일입니다.

설명

RemoveFile호출할 수 있는 VCProject 또는 VCFilter 개체.하나 제거 파일이 있는 경우 현재 폴더에서와 프로젝트 모두에서 합니다.RemoveFile파일이 디스크에서 삭제 되지는지 않습니다.

참조 하십시오 방법: 프로젝트 모델 확장성에 대한 예제 코드 컴파일 컴파일하고이 예제를 실행 하는 방법에 대 한 정보를 합니다.

예제

다음 예제를 사용 하 여 RemoveFile 에 있는 VCFilter 개체는 통합된 개발 환경 (IDE)에서:

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

Public Module Module1
    Sub Test()
        Dim idx As Integer
        Dim filter As VCFilter
        Dim file As VCFile
        Dim col As IVCCollection
        Dim prj, prj2 As VCProject
        prj = DTE.Solution.Projects.Item(1).Object
        col = prj.Filters
        filter = col.Item("MyFolder")
        col = filter.Files
        file = col.Item("x.x")
        filter.RemoveFile(file)
    End Sub
End Module

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

VCFilter 인터페이스

Microsoft.VisualStudio.VCProjectEngine 네임스페이스