C# färben bestimmten Bereich?
Hallo, wie kann ich in C# Consolenanwendung zB
char array = new char[1];
Console.WriteLine("Ich bin weiß " + array[0 );
Wie kann ich machen, dass jetzt nur array[0] in rot steht ?
Danke für die Hilfe im Vorraus
1 Antwort
Console.Write("Ich bin die Farbe ");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write(" rot ");
Quelle:
https://msdn.microsoft.com/en-us/library/system.console.foregroundcolor(v=vs.110).aspx
SonnyBlackAUT
25.03.2016, 18:57
@Sekai2706
Console.Write("Ich bin weiß " );
Console.ForgroundColor = ConsoleColor.Red;
Console.Write(array[0]);
dies weiß ich auch aber wie mache ich nur dieses array da rot :/ also so wie im beispiel meine ich (Ich bin die Farbe rot soll nicht rot sein xD)