This documentation is archived and is not being maintained.

ProjectItem Property (General Extensibility)

Visual Studio .NET 2003

Returns the ProjectItem Object associated with the given object.

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

Return Value

Returns a ProjectItem object.

Example

Sub ProjectItemExample()
   ' 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

ProjectItem Object | ProjectItems Collection

Applies To: CodeAttribute Object | CodeClass Object | CodeDelegate Object | CodeElement Object | CodeEnum Object | CodeFunction Object | CodeInterface Object | CodeNameSpace Object | CodeParameter Object | CodeProperty Object | CodeStruct Object | CodeType Object | CodeVariable Object | Document Object | SelectedItem Object | VCCodeAttribute Object | VCCodeBase Object | VCCodeClass Object | VCCodeDelegate Object | VCCodeElement Object | VCCodeEnum Object | VCCodeEvent Object | VCCodeFunction Object | VCCodeIDLCoClass Object | VCCodeIDLImport Object | VCCodeIDLImportLib Object | VCCodeIDLLibrary Object | VCCodeImport Object | VCCodeInclude Object | VCCodeInterface Object | VCCodeMacro Object | VCCodeMap Object | VCCodeMapEntry Object | VCCodeNamespace Object | VCCodeParameter Object | VCCodeProperty Object | VCCodeStruct Object | VCCodeTypedef Object | VCCodeUnion Object | VCCodeUsing Object | VCCodeVariable Object | VSProjectItem Object | Window Object

Show: