다음을 통해 공유


ProjectItem.FileNames 속성

프로젝트 항목과 연결된 파일의 전체 경로와 이름을 가져옵니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
ReadOnly Property FileNames ( _
    index As Short _
) As String
string this[
    short index
] { get; }
property String^ FileNames[[InAttribute] short index] {
    String^ get ([InAttribute] short index);
}
abstract FileNames : 
        index:int16 -> string with get
JScript에서는 인덱싱된 속성을 지원하지 않습니다.

매개 변수

  • index
    형식: Int16

    필수 요소. 1부터 파일 이름의 인덱스 FileCount 프로젝트 항목에 대 한 합니다.

속성 값

형식: String
프로젝트 항목과 연결된 파일의 전체 경로와 이름을 나타내는 문자열입니다.

설명

대부분의 프로젝트 항목 그와 관련 된 파일을 하나만 있지만 일부 언어에서는 각 항목이 여러 파일이 포함 될 수 있습니다. 예는 ProjectItem 에서 폼의 Visual Basic 및 Visual C# .resx 파일 등 다른 프로젝트 항목을 포함할 수 있는 소스 파일을 나타냅니다.

때 프로젝트 항목의 ProjectItems 속성에 값이 고 ProjectItem 개체는 디스크에 있는 필터 폴더를 나타냅니다 그런 다음 FileNames 속성 필터 폴더의 이름을 반환 합니다.

예제

Sub FileNamesExample()
   Dim proj As Project
   Dim projitems As ProjectItems

   ' Reference the current solution and its projects and project items.
   proj = DTE.ActiveSolutionProjects(0)
   projitems = proj.ProjectItems

   ' List the file name associated with the first project item.
   MsgBox(projitems.Item(1).FileNames(1))
End Sub

.NET Framework 보안

참고 항목

참조

ProjectItem 인터페이스

EnvDTE 네임스페이스

기타 리소스

프로젝트 및 솔루션 제어