fork download
  1. switch (pressedKeys[letterIndex])
  2. {
  3. case Keys.A:
  4. case Keys.B:
  5. case Keys.C:
  6. case Keys.D:
  7. case Keys.E:
  8. case Keys.F:
  9. case Keys.G:
  10. case Keys.H:
  11. case Keys.I:
  12. case Keys.J:
  13. case Keys.K:
  14. case Keys.L:
  15. case Keys.M:
  16. case Keys.N:
  17. case Keys.O:
  18. case Keys.P:
  19. case Keys.Q:
  20. case Keys.R:
  21. case Keys.S:
  22. case Keys.T:
  23. case Keys.U:
  24. case Keys.V:
  25. case Keys.W:
  26. case Keys.X:
  27. case Keys.Y:
  28. case Keys.Z:
  29. char [] appendCharacter = keyboard.GetPressedKeys()[0].ToString().ToCharArray();
  30.  
  31. if (keyboard.IsKeyDown(Keys.LeftShift) || keyboard.IsKeyDown(Keys.RightShift))
  32. appendCharacter[0] = Char.ToUpper(appendCharacter[0]);
  33. else
  34. appendCharacter[0] = Char.ToLower(appendCharacter[0]);
  35.  
  36. boxText = boxText.Insert(boxText.Length, appendCharacter[0].ToString());
  37. break;
  38.  
  39. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(1,0): error CS1525: Unexpected symbol `switch'
prog.cs(1,32): error CS1525: Unexpected symbol `)'
prog.cs(29,30): warning CS0658: `]' is invalid attribute target. All attributes in this attribute section will be ignored
prog.cs(39,17): error CS8025: Parsing error
Compilation failed: 3 error(s), 1 warnings
stdout
Standard output is empty