fork download
  1. using System;
  2. using System.Windows.Input;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8.   // your code goes here
  9.   while (true)
  10. {
  11. //Dを押した場合の処理(キーボード1個押して処理に入って欲しい)
  12. if (IsKeyDown(Key.D))
  13. {
  14. Console.WriteLine("Dが押されました");
  15. string input;
  16.  
  17. //ここでは文字列を得たい
  18. input = Console.ReadLine();
  19. if (input == "sss")
  20. {
  21. //sssが入力された時、処理を行う
  22. break;
  23. }
  24. }
  25.  
  26. //Eを押した場合の処理
  27. //else if(IsKeyDown(Key.E))
  28. //{
  29. // ...
  30. //}
  31. }
  32. }
  33. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(8,9): error CS1056: Unexpected character ` '
prog.cs(8,10): error CS1056: Unexpected character ` '
prog.cs(9,9): error CS1056: Unexpected character ` '
prog.cs(9,10): error CS1056: Unexpected character ` '
Compilation failed: 4 error(s), 0 warnings
stdout
Standard output is empty