Console.Title Property

 

Gets or sets the title to display in the console title bar.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

static member Title : string with get, set

Property Value

Type: System.String

The string to be displayed in the title bar of the console. The maximum length of the title string is 24500 characters.

Exception Condition
InvalidOperationException

In a get operation, the retrieved title is longer than 24500 characters.

ArgumentOutOfRangeException

In a set operation, the specified title is longer than 24500 characters.

ArgumentNullException

In a set operation, the specified title is null.

IOException

An I/O error occurred.

Win9xFamily

The maximum length of the title string is 127 ANSI characters. Unicode characters are not supported.

This example demonstrates the Title property. The example displays the current title of the operating system window, waits for a key press, then displays a new title.

No code example is currently available or this language may not be supported.

UIPermission

for modifying safe top-level windows and subwindows. Associated enumeration: UIPermissionWindow.SafeTopLevelWindows

.NET Framework
Available since 2.0
Return to top
Show: