Share via


CommandWindow.OutputString 메서드

텍스트 문자열을 명령 창에 보냅니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
Sub OutputString ( _
    Text As String _
)
void OutputString(
    string Text
)
void OutputString(
    String^ Text
)
abstract OutputString : 
        Text:string -> unit
function OutputString(
    Text : String
)

매개 변수

  • Text
    형식: String

    필수입니다. 창으로 보낼 텍스트 문자입니다.

설명

OutputString은 줄 바꿈 문자를 자동으로 문자열에 추가하지 않습니다. 문자열에 줄 바꿈 문자를 추가하려면 Text에 줄 바꿈 문자를 추가해야 합니다.

예제

Sub CommandWinExample(ByVal dte As DTE)
    ' Get a reference to the Command window.
    Dim win As Window = _
    DTE.Windows.Item(EnvDTE.Constants.vsWindowKindCommandWindow)
    Dim CW As CommandWindow = win.Object

    ' Input a command into the Command window and execute it.
    CW.SendInput("nav https://www.microsoft.com", False)

    ' Insert some information text into the Command window.
    CW.OutputString("This URL takes you to the main Microsoft _
    website.")

    ' Clear the contents of the Command window.
    MsgBox("Clearing the Command window...")
    CW.Clear()
End Sub
void CommandWinExample(_DTE dte) 
{
    // Get a reference to the Command window.
    Window win =    
    dte.Windows.Item(EnvDTE.Constants.vsWindowKindCommandWindow);
    CommandWindow CW = (CommandWindow)win.Object;

    // Input a command into the Command window and execute it.
    CW.SendInput("nav https://www.microsoft.com", false);

    // Insert some information text into the Command window.
    CW.OutputString("This URL takes you to the main Microsoft 
    website.");

    // Clear the contents of the Command window.
    MessageBox.Show("Clearing the Command window...");
    CW.Clear();
}

.NET Framework 보안

참고 항목

참조

CommandWindow 인터페이스

EnvDTE 네임스페이스

기타 리소스

방법: 자동화 개체 모델 코드의 예제 컴파일 및 실행