Processes.Item Method

Returns an indexed member of a Processes collection.

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

Syntax

'Declaration
Function Item ( _
    index As Object _
) As Process
Process Item(
    Object index
)
Process^ Item(
    [InAttribute] Object^ index
)
abstract Item : 
        index:Object -> Process
function Item(
    index : Object
) : Process

Parameters

  • index
    Type: System.Object

    Required. The index of the item to return.

Return Value

Type: EnvDTE.Process
A Process object.

Remarks

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

Examples

The following example demonstrates how to use the Item method.

To test this method:

  1. Run the target application in the debug mode. Make sure the target application contains an infinite loop.

  2. Run the add-in.

public static void Item(DTE dte)
{
    EnvDTE.Processes processes = dte.Debugger.DebuggedProcesses;
    processes.Item(1).Break(true);
}
Shared Sub Item(ByRef dte As EnvDTE.DTE)
    Dim processes As EnvDTE.Processes = dte.Debugger.DebuggedProcesses
    processes.Item(1).Break(True)
End Sub

.NET Framework Security

See Also

Reference

Processes Interface

EnvDTE Namespace

Other Resources

How to: Compile and Run the Automation Object Model Code Examples