Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
FileCount Property (General Extensibility)
ID
Top
Collapse the table of content
Expand the table of content

FileCount Property (General Extensibility)

Visual Studio .NET 2003

Returns the number of files associated with a project item or output group.

[Visual Basic .NET]
Public ReadOnly Property FileCount() As Long
[Visual Basic 6]
Property Get FileCount() As Long
[C++]
HRESULT __stdcall get_FileCount(
   /* [out, retval] */ long* retVal
);
[C#]
int FileCount {get;}
[JScript .NET]
public function get FileCount() : int

Remarks

For the ProjectItem object, most project items consist of only one file, but some can have more than one, as with forms in Visual Basic which are saved as both .frm (text) and .frx (binary) files.

For the OutputGroup object, the item should first be built to accurately determine the output files.

Example

Sub FileCountExample()
   ' Must have a project open before running this.
   Dim ProjItem As ProjectItem
   ProjItem = DTE.Solution.Projects.Item(1).ProjectItems.Item(1)
   MsgBox("Number of files: " & ProjItem.FileCount)
End Sub

See Also

FileNames Property (OutputGroup Object) | OutputGroups Property

Applies To: ProjectItem Object | OutputGroup Object

Show:
© 2015 Microsoft