Transports::Item Method (Object^)

 

Gets an indexed member of a Transports collection.

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

Transport^ Item(
	Object^ index
)

Parameters

Index

Required. The index of the Transport to return.

Return Value

Type: EnvDTE80::Transport^

A Transport object.

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

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
Return to top
Show: