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
- Plena confianza para el llamador inmediato. Un código de confianza parcial no puede utilizar este miembro. Para obtener más información, vea Utilizar bibliotecas de código que no es de plena confianza.
Vea también
Referencia
Otros recursos
Cómo: Compilar y ejecutar los ejemplos de código del modelo de objetos de automatización