다음을 통해 공유


Window2.Object Property

Definition

Gets an object that can be accessed by name at run time.

public:
 property System::Object ^ Object { System::Object ^ get(); };
public:
 property Platform::Object ^ Object { Platform::Object ^ get(); };
[System.Runtime.InteropServices.DispId(123)]
public object Object { [System.Runtime.InteropServices.DispId(123)] get; }
[<System.Runtime.InteropServices.DispId(123)>]
[<get: System.Runtime.InteropServices.DispId(123)>]
member this.Object : obj
Public ReadOnly Property Object As Object

Property Value

An object.

Implements

Attributes

Examples

This example creates an OutputWindow object, and then uses it to write text to an OutputWindowPane object.

Imports EnvDTE  
Imports EnvDTE80  
Sub ObjectExample(ByVal dte As DTE2)  
    Dim win As Window2  
    win = _  
CType(_applicationObject.Windows.Item _  
(Constants.vsWindowKindOutput), Window2)  
    Dim output As OutputWindow  
    Dim outpane As OutputWindowPane  
    output = CType(win.Object(), OutputWindow)  
    outpane = output.OutputWindowPanes.Add("my output")  
    outpane.OutputString("Add test text to an Ouput  _  
    pane obtained from the Window2.Object.")  
End Sub  
using EnvDTE;  
using EnvDTE80;  
using System.Windows.Forms;  
public void ObjectExample (DTE2 dte)  
{  
    Window2 win;  
    win =   
(Window2)_applicationObject.Windows.Item  
(Constants.vsWindowKindOutput);  
    OutputWindow output;  
    OutputWindowPane outpane;  
    output = (OutputWindow)win.Object;  
    outpane = output.OutputWindowPanes.Add("My Output");  
    outpane.OutputString("Add test text to an Ouput pane   
obtained from the Window2.Object.");  
}  

Remarks

Returns the extensibility object for the tool represented by the window.

Applies to