fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void main (String[] args) throws java.lang.Exception
  6. {
  7. try {
  8. // your code goes here
  9. Director.Create("C:\\testdir");
  10. } catch (Exception ex) {
  11. ErrHandler(ex);
  12. }
  13. }
  14.  
  15. private void ErrHandler(Exception ex) {
  16. switch (GetType(ex).ToString()) {
  17. case "IOException":
  18. MessageBox.Show("入出力エラーが発生しました。");
  19. break;
  20. default :
  21. MessageBox.Show("想定外のエラーが発生しました。");
  22. break;
  23. }
  24. }
  25. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(5,41): error CS1525: Unexpected symbol `throws', expecting `;', `{', `=>', or `where'
prog.cs(10,9): error CS1519: Unexpected symbol `catch' in class, struct, or interface member declaration
prog.cs(10,24): error CS1519: Unexpected symbol `)' in class, struct, or interface member declaration
prog.cs(10,26): error CS9010: Primary constructor body is not allowed
prog.cs(15,9): error CS1525: Unexpected symbol `void', expecting `class', `delegate', `enum', `interface', `partial', or `struct'
Compilation failed: 5 error(s), 0 warnings
stdout
Standard output is empty