Написал простой класс локер который не даёт писать в консоль как буквы так и цифры и.т.д using System; public class Locker { public static string ConsoleInput(bool status = true) { while (true) { ConsoleKeyInfo a = Console.ReadKey(status); string str = string.Empty; if (int.TryParse(a.KeyChar.ToString(), out int i) != char.IsDigit(a.KeyChar)) { Console.Write(a.KeyChar); str += a.KeyChar; } if (a.Key == ConsoleKey.Backspace) { int currentCursorPos = Console.CursorLeft; Console.SetCursorPosition(currentCursorPos, Console.CursorTop); if (str.Length > 0) { str = str.Substring(0, str.Length - 1); } Console.SetCursorPosition(currentCursorPos + str.Length, Console.CursorTop); } } } } CSHARP using System; public class Locker { public static string ConsoleInput(bool status = true) { while (true) { ConsoleKeyInfo a = Console.ReadKey(status); string str = string.Empty; if (int.TryParse(a.KeyChar.ToString(), out int i) != char.IsDigit(a.KeyChar)) { Console.Write(a.KeyChar); str += a.KeyChar; } if (a.Key == ConsoleKey.Backspace) { int currentCursorPos = Console.CursorLeft; Console.SetCursorPosition(currentCursorPos, Console.CursorTop); if (str.Length > 0) { str = str.Substring(0, str.Length - 1); } Console.SetCursorPosition(currentCursorPos + str.Length, Console.CursorTop); } } } } Вызов ConsoleInput в любом месте.