Expression.Parent Propriété
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.
Obtient l'objet parent immédiat d'un objet Expression.
public:
property EnvDTE::Debugger ^ Parent { EnvDTE::Debugger ^ get(); };
public:
property EnvDTE::Debugger ^ Parent { EnvDTE::Debugger ^ get(); };
[System.Runtime.InteropServices.DispId(201)]
public EnvDTE.Debugger Parent { [System.Runtime.InteropServices.DispId(201)] get; }
[<System.Runtime.InteropServices.DispId(201)>]
[<get: System.Runtime.InteropServices.DispId(201)>]
member this.Parent : EnvDTE.Debugger
Public ReadOnly Property Parent As Debugger
Valeur de propriété
Objet Debugger.
- Attributs
Exemples
L’exemple suivant montre comment utiliser la Parent propriété.
public static void Parent(DTE dte)
{
// Setup debug Output window.
Window w = (Window)dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);
w.Visible = true;
OutputWindow ow = (OutputWindow)w.Object;
OutputWindowPane owp = ow.OutputWindowPanes.Add("Parent Property Test");
owp.Activate();
EnvDTE.Expression exp = dte.Debugger.GetExpression("tempC", true, 1);
owp.OutputString("The name of the current program: " + exp.Parent.CurrentProgram.Name);
}
Shared Sub Parent(ByRef dte As EnvDTE.DTE)
Dim exp As EnvDTE.Expression = dte.Debugger.GetExpression("tempC", True, 1)
MessageBox.Show("The name of the current program: " + _
exp.Parent.CurrentProgram.Name, _
"Expression Test - Parent Property")
End Sub
Remarques
La propriété Parent retourne le parent immédiat de l'objet Expression. Si vous souhaitez obtenir la collection conteneur, utilisez la propriété Collection.