Compartir a través de


Documents.Parent (Propiedad)

Obtiene el objeto primario inmediato de una colección Documents.

Espacio de nombres:  EnvDTE
Ensamblado:  EnvDTE (en EnvDTE.dll)

Sintaxis

'Declaración
ReadOnly Property Parent As DTE
DTE Parent { get; }
property DTE^ Parent {
    DTE^ get ();
}
abstract Parent : DTE
function get Parent () : DTE

Valor de propiedad

Tipo: EnvDTE.DTE
Objeto DTE.

Comentarios

La propiedad Parent devuelve el objeto primario inmediato del objeto o la colección.

Ejemplos

public void Example(DTE2 dte)
{
   try
   {
      // Run this code after opening a project with at least one document.
      Documents docs;

      // Return the documents collection in the current application instance.
      docs = dte.Documents;

      // Show the number of open documents in the current application.
      MessageBox.Show(docs.Count.ToString());

      // Show the parent object of the current docs collection.
      MessageBox.Show(docs.Parent.FullName);
   }
   catch (Exception ex)
   {
      MessageBox.Show(ex.Message);
   }
}

Seguridad de .NET Framework

Vea también

Referencia

Documents Interfaz

EnvDTE (Espacio de nombres)

Otros recursos

Cómo: Compilar y ejecutar los ejemplos de código del modelo de objetos de automatización