IReferenceService Interface
TOC
Collapse the table of content
Expand the table of content

IReferenceService Interface

Provides an interface for obtaining references to objects within a project by name or type, obtaining the name of a specified object, and for locating the parent of a specified object within a designer project.

Namespace:  System.ComponentModel.Design
Assembly:  System (in System.dll)

public interface IReferenceService

The IReferenceService interface provides the following methods:

  • The GetReference method returns the component with the specified name, or a null reference (Nothing in Visual Basic) if no component with the specified name was found.

  • The GetName method returns the name associated with the specified component.

  • The GetComponent method returns the parent container of the specified component.

  • The GetReferences method returns an array of references to all project components, or all project components of an optionally specified type.

The following example control uses the GetReferences method of the IReferenceService interface to obtain a list of components in the current design mode project of the type of the currently selected component.

No code example is currently available or this language may not be supported.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2016 Microsoft