using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp11
{
class Program
{
static void Main(string[] args)
{
//Girilen tuşun password char yapma
Console.BackgroundColor = ConsoleColor.Yellow;
Console.ForegroundColor = ConsoleColor.DarkBlue;
Console.Clear();
ConsoleKeyInfo keyInfo = default(ConsoleKeyInfo);
string password = "";
do
{
keyInfo = Console.ReadKey(true);
if (keyInfo.Key != ConsoleKey.Enter)
{
password += keyInfo.KeyChar;
Console.Write("*");
}
} while (!(keyInfo.Key == ConsoleKey.Enter));
Console.WriteLine();
Console.WriteLine("Girilen Şifre:"+password);
Console.ReadLine();
}
}
}
Hiç yorum yok:
Yorum Gönder