2075 / C# / Введення
string a = Console.ReadLine(); // до Enter
Console.ReadKey(); // спрацьовує після першого символу
int a = Convert.ToInt32(Console.ReadLine()); // Convert.ToInt32(null) = 0
int a = int.Parse(Console.ReadLine()); // int.Parse(null) - вилітає
int.TryParse(Console.ReadLine(), out a); // якщо не вдається, повертає 0
double a = Convert.ToDouble(Console.ReadLine()); // 3,14 - вводити через кому, США - крапку
char ch = Console.ReadKey().KeyChar; // без Enter
int a = Console.Read(); // ASCII, "abcd" -> 97, Enter -> 13
Як зловити стрілки
ConsoleKeyInfo select = Console.ReadKey(); // без Enter
if (ConsoleKey.DownArrow == select.Key) // і Y, і y - ловить як одне
{
Console.WriteLine("Yes");
}
else {
Console.WriteLine("No");
}