Threads.Item(Object) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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
Paramètres
Retours
Objet Thread.
- Attributs
Exemples
L'exemple suivant décrit comment utiliser la méthode Item.
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
Remarques
La Item méthode lève une System.ArgumentException exception si la collection ne peut pas trouver l’objet qui correspond à la valeur d’index.