Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
ID
Top
Expand Minimize

ContainingProject Property (General Extensibility)

Visual Studio .NET 2003

Returns the project hosting the project item or items.

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

Return Value

Returns a Project object.

Example

Sub ContainingProjectExample()
   Dim ProjItem As ProjectItem
   ProjItem = DTE.Solution.Projects.Item(1).ProjectItems.Item(1)
   MsgBox(ProjItem.ContainingProject.Name)
End Sub

See Also

Applies To:ProjectItem Object | ProjectItems Collection

Show:
© 2015 Microsoft