Engines.Item(Object) Engines.Item(Object) Engines.Item(Object) Engines.Item(Object) Engines.Item(Object) Engines.Item(Object) Method

Definition

Gets an indexed member of a Engines collection.

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

Parameters

Returns

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 value for Index can be:

  • A BSTR representing the first few letters of the full name of the engine.

  • A BSTR representing the GUID of the engine.

  • A 1-based integer value

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

Applies to