Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets a collection of global types for the specified project that match the specified type.
Namespace:  Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
Syntax
'Declaration
Public Function GetGlobalTypes ( _
    project As Project _
) As GlobalTypeCollection
public GlobalTypeCollection GetGlobalTypes(
    Project project
)
public:
GlobalTypeCollection^ GetGlobalTypes(
    Project^ project
)
member GetGlobalTypes : 
        project:Project -> GlobalTypeCollection
public function GetGlobalTypes(
    project : Project
) : GlobalTypeCollection
Parameters
- project 
 Type: EnvDTE.Project- The Project to obtain global types from. 
Return Value
Type: Microsoft.VisualStudio.Shell.Design.GlobalTypeCollection
A GlobalTypeCollection containing the global types for the specified project.
Exceptions
| Exception | Condition | 
|---|---|
| ArgumentNullException | project is nulla null reference (Nothing in Visual Basic). | 
| InvalidOperationException | The implementation of GetGlobalTypesCore returned nulla null reference (Nothing in Visual Basic). | 
Remarks
The GetGlobalTypes method provides a standard wrapper for the GetGlobalTypesCore method. GetGlobalTypes will ignore all except the most critical exceptions thrown by the core method, namely NullReferenceException, StackOverflowException, OutOfMemoryException and ThreadAbortException.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.