C# Konsolen Anwendung Titel ändern?

2 Antworten

Vom Beitragsersteller als hilfreich ausgezeichnet

Console.Title = "Titel"

Bild zum Beitrag

Merkwürdig, also ich bekomme Ergebnisse angezeigt, wenn ich danach google. ...

https://docs.microsoft.com/en-us/dotnet/api/system.console.title?view=net-5.0

// This example demonstrates the Console.Title property.
using System;

class Sample
{
    public static void Main()
    {
    Console.WriteLine("The current console title is: \"{0}\"",
                      Console.Title);
    Console.WriteLine("  (Press any key to change the console title.)");
    Console.ReadKey(true);
    Console.Title = "The title has changed!";
    Console.WriteLine("Note that the new console title is \"{0}\"\n" +
                      "  (Press any key to quit.)", Console.Title);
    Console.ReadKey(true);
    }
}
/*
This example produces the following results:

>myTitle
The current console title is: "Command Prompt - myTitle"
  (Press any key to change the console title.)
Note that the new console title is "The title has changed!"
  (Press any key to quit.)

*/
 - (Computer, Technik, Technologie)

DaveRV 
Beitragsersteller
 09.09.2021, 15:18

Dieses Ergebnis habe ich auch gefunden, aber es nicht ganz verstanden. Deswegen habe ich hier gefragt.

0
Xearox  09.09.2021, 19:12
@DaveRV

Was genau ist denn damit dein Problem? Konkretisiere dies bitte.

0
Xearox  10.09.2021, 15:51
@DaveRV

Du hast immer noch nicht geschrieben, wo dein Problem mit den MS Docs ist und diesem Beispiel ;-)

0