Threads.Item(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
EnvDTE::Thread ^ Item(System::Object ^ index);
public:
EnvDTE::Thread ^ Item(Platform::Object ^ index);
EnvDTE::Thread Item(winrt::Windows::Foundation::IInspectable const & index);
[System.Runtime.InteropServices.DispId(0)]
public EnvDTE.Thread Item (object index);
[<System.Runtime.InteropServices.DispId(0)>]
abstract member Item : obj -> EnvDTE.Thread
Public Function Item (index As Object) As Thread
Parameters
Returns
A Thread object.
- Attributes
Examples
The following example demonstrates how to use the Item method.
public static void ThreadsItem(DTE dte)
{
EnvDTE.Threads threads = dte.Debugger.CurrentProgram.Threads;
MessageBox.Show("\nThe thread name: " +
threads.Item(2).Name, "Testing Threads Item Method");
}
Shared Sub ThreadsItem(ByRef dte As EnvDTE.DTE)
Dim threads As EnvDTE.Threads = dte.Debugger.CurrentProgram.Threads
MessageBox.Show("The thread name: " + threads.Item(2).Name, _
"Threads Test - Item Method")
End Sub
Remarks
The Item method throws a System.ArgumentException
exception if the collection cannot find the object that corresponds to the index value.