CommandWindow.OutputString(String) Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Envia uma cadeia de texto para a janela de comando .
public:
void OutputString(System::String ^ Text);
public:
void OutputString(Platform::String ^ Text);
void OutputString(std::wstring const & Text);
[System.Runtime.InteropServices.DispId(4)]
public void OutputString (string Text);
[<System.Runtime.InteropServices.DispId(4)>]
abstract member OutputString : string -> unit
Public Sub OutputString (Text As String)
Parâmetros
- Text
- String
Obrigatórios. Os caracteres de texto a serem enviados para a janela.
- Atributos
Exemplos
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 http://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 http://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();
}
Comentários
OutputString Não adiciona automaticamente novos caracteres de linha à cadeia de caracteres. Se você quiser esses caracteres na cadeia de caracteres, deverá adicioná-los ao Text .