Compartir a través de


EditPoint.Parent Property

Definition

Gets the immediate parent object of the EditPoint object.

public:
 property EnvDTE::TextDocument ^ Parent { EnvDTE::TextDocument ^ get(); };
public:
 property EnvDTE::TextDocument ^ Parent { EnvDTE::TextDocument ^ get(); };
[System.Runtime.InteropServices.DispId(2)]
public EnvDTE.TextDocument Parent { [System.Runtime.InteropServices.DispId(2)] get; }
[<System.Runtime.InteropServices.DispId(2)>]
[<get: System.Runtime.InteropServices.DispId(2)>]
member this.Parent : EnvDTE.TextDocument
Public ReadOnly Property Parent As TextDocument

Property Value

A TextDocument object.

Implements

Attributes

Examples

public void Example(DTE2 dte)  
{  
   try  
   {  
      // Open a text document before running this example.  
      TextDocument objTD, objTD2;  
      EditPoint objEP;  

      objTD = (TextDocument)dte.ActiveDocument.Object("TextDocument");  
      objEP = (EditPoint)objTD.StartPoint.CreateEditPoint();  
      objEP.Insert("Hello ");  
      objTD2 = objEP.Parent;  
      MessageBox.Show(objTD2.Type);  
   }  
   catch (Exception ex)  
   {  
      MessageBox.Show(ex.Message);  
   }  
}  

Remarks

The Parent property returns the immediate parent to the object or collection.

Applies to