Close Method (ConsoleWindow)

Class

ConsoleWindow.

Action

Closes the console.

Syntax

C#
consoleWindow.Close ([sItemIdentifier])
VB
consoleWindow.Close ([sItemIdentifier])
Variable Description
sItemIdentifier The index of the console window or the caption of the window. If this parameter is left blank, Silk4NET closes the first found console window. STRING.

Example 1

The following sample shows how you can use the index to define that you want to close the second console window:
consoleWindow.Close(2)

Example 2

The following sample shows how you can use the full identifier of a console window to close the console window:
consoleWindow.Close("C:\\Windows\\system32\\cmd.exe[1]")