Share via


Documents.DTE Property

Gets the top-level extensibility object.

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

Syntax

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

Property Value

Type: EnvDTE.DTE
A DTE object.

Remarks

In Visual Studio, the DTE object is the root of the automation model, which other object models often call "Application."

Examples

[C#]

public void CodeExample(DTE2 dte)
{   
    try
    {
        Documents docs;
        docs = dte.Documents;
        if (docs.DTE.Equals(dte))
            MessageBox.Show("These two objects do equal each other.");
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}

.NET Framework Security

See Also

Reference

Documents Interface

EnvDTE Namespace

Other Resources

How to: Compile and Run the Automation Object Model Code Examples