Udostępnij za pośrednictwem


References Interface

Contains all the references to external components in a Visual Basic or C# project.

Namespace:  VSLangProj
Assembly:  VSLangProj (in VSLangProj.dll)

Syntax

'Declaration
<GuidAttribute("B8758EE4-0553-4BC9-8432-440449D35C14")> _
Public Interface References _
    Inherits IEnumerable
[GuidAttribute("B8758EE4-0553-4BC9-8432-440449D35C14")]
public interface References : IEnumerable
[GuidAttribute(L"B8758EE4-0553-4BC9-8432-440449D35C14")]
public interface class References : IEnumerable
[<GuidAttribute("B8758EE4-0553-4BC9-8432-440449D35C14")>]
type References =  
    interface
        interface IEnumerable
    end
public interface References extends IEnumerable

The References type exposes the following members.

Properties

  Name Description
Public property ContainingProject Gets the project of which the selected item is a part. Read-only.
Public property Count Gets a value indicating the number of objects in the collection. Read-only.
Public property DTE Gets the top-level extensibility object.
Public property Parent Gets the immediate parent object of a given object.

Top

Methods

  Name Description
Public method Add Adds a new reference to the project.
Public method AddActiveX Adds a reference to an ActiveX type library.
Public method AddProject Adds a new project reference to the project and returns the newly created Reference object.
Public method Find Searches the references in a project for an object that has the specified Identity.
Public method GetEnumerator() Returns an enumerator that iterates through a collection. (Inherited from IEnumerable.)
Public method GetEnumerator() Gets an enumeration for items in a collection.
Public method Item Returns an indexed Reference object.

Top

Remarks

In order to write code against an external component, your project must first contain a reference to that component. A reference can be made to three types of components: .NET assemblies, .NET projects, and COM automation servers and controls. For more information on the types of references that may be added, see Add, AddActiveX, and AddProject.

Examples

See the References.

See Also

Reference

VSLangProj Namespace