Jag sitter och leker lite med C# 2.0 nu och försöker ändra bakgrundsfärgen i consolen.
Jag lyckas få en annan bakgrundsfärg bakom texten, men inte i hela consolen.
Någon som har en lösning?
Min nuvarande kod:
#region Using directives
using System;
using System.Collections.Generic;
using System.Text;
#endregion
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.BackgroundColor = ConsoleColor.DarkBlue;
Console.ForegroundColor = ConsoleColor.White;
Console.Title = "Testar att ändra titel...";
Console.WriteLine("Text 1:");
string String1 = System.Console.ReadLine();
Console.WriteLine("Text 2:");
string String2 = System.Console.ReadLine();
StringBuilder strString = new StringBuilder();
strString.Append(String1);
strString.Append(String2);
Console.WriteLine("Första strängen: {0}", String1);
Console.WriteLine("Andra strängen: {0}", String2);
Console.WriteLine("--------------------------------------------------");
Console.WriteLine("Båda ihoppsatta: {0}", strString);
Console.ReadLine();
}
}
}