C# windows application
I want the code to be like this:
1-receive a text and 2-show caps lock is on or not, at the same time.
Please fix this? Thanks.
using System;
namespace ConsoleApplication89
{
class Program
{
static void Main(string[] args)
{
Console.Title = "Pasword";
while (Console.ReadKey().Key != ConsoleKey.Enter)
{
int origRow = Console.CursorTop;
int origCol = Console.CursorLeft;
Console.SetCursorPosition(60, 23);
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("CapsLock = " + (Console.CapsLock));
Console.ForegroundColor = ConsoleColor.Gray;
Console.SetCursorPosition(origCol, origRow);
}
string A = Console.ReadLine();
Console.WriteLine("Password entered =" + A);
}
}
}