Partilhar via


Transports.Item(Object) Method

Definition

Gets an indexed member of a Transports collection.

public:
 EnvDTE80::Transport ^ Item(System::Object ^ index);
public:
 EnvDTE80::Transport ^ Item(Platform::Object ^ index);
EnvDTE80::Transport Item(winrt::Windows::Foundation::IInspectable const & index);
[System.Runtime.InteropServices.DispId(0)]
public EnvDTE80.Transport Item (object index);
[<System.Runtime.InteropServices.DispId(0)>]
abstract member Item : obj -> EnvDTE80.Transport
Public Function Item (index As Object) As Transport

Parameters

index
Object

Returns

A Transport object.

Attributes

Examples

Imports EnvDTE  
Imports EnvDTE80  
Imports System.Diagnostics  
Imports Microsoft.VisualBasic.ControlChars  

Public Module Module1  

    Sub ShowDefaultEngines()  
        Dim dbg As EnvDTE80.Debugger2  
        dbg = DTE.Debugger  
        dbg.HexDisplayMode = True  
        Dim transport As EnvDTE80.Transport  
        transport = dbg.Transports.Item("default")  
        Dim engine As EnvDTE80.Engine  
        Dim strEngineList As String  
        For Each engine In transport.Engines  
            strEngineList = strEngineList + engine.Name + ", " + _  
            engine.ID + ", " + engine.AttachResult.ToString + NewLine  
        Next  
        MsgBox(strEngineList)  
    End Sub  
End Module  

Remarks

The Item method throws a System.ArgumentException exception if the collection cannot find the Transport object that corresponds to the index value.

Applies to