Compartilhar via


Processes.Parent Property

Gets the immediate parent object of a Processes collection.

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

Syntax

'Declaration
ReadOnly Property Parent As Debugger
Debugger Parent { get; }
property Debugger^ Parent {
    Debugger^ get ();
}
abstract Parent : Debugger with get
function get Parent () : Debugger

Property Value

Type: EnvDTE.Debugger
A Debugger object.

Examples

The following example demonstrates how to use the Parent property.

To test this property:

  • Open the target project and run the add-in.
public static void Parent(DTE dte)
{
    EnvDTE.Processes processes = dte.Debugger.LocalProcesses;
    MessageBox.Show("\nThe name of the current program: " + 
                    processes.Parent.CurrentProgram.Name, 
                    "Testing Processes Parent Property");
}
Shared Sub Parent(ByRef dte As EnvDTE.DTE)
    Dim processes As EnvDTE.Processes = dte.Debugger.LocalProcesses
    MessageBox.Show("The name of the current program: " + _
                    processes.Parent.CurrentProgram.Name, _
                    "Processes Test - Parent Property")
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