EditPoint2::Parent Property

 

Gets the immediate parent object of the EditPoint object.

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

property TextDocument^ Parent {
	TextDocument^ get();
}

Property Value

Type: EnvDTE::TextDocument^

A TextDocument object.

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

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);
   }
}
Return to top
Show: