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.ObjectRequired. 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:
Run the target application in the debug mode. Make sure the target application contains an infinite loop.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Other Resources
How to: Compile and Run the Automation Object Model Code Examples