fork(1) download
  1. public partial class Form1 : Form
  2. {
  3. public Form1()
  4. {
  5. InitializeComponent();
  6. }
  7.  
  8. private void Form1_Load(object sender, EventArgs e)
  9. {
  10. string hyouji;
  11. TextBox textbox01 = new TextBox();
  12. this.Controls.Add(textbox01);
  13. hyouji = Test01();
  14. textbox01.Text = hyouji;
  15. }
  16.  
  17. private string Test01()//テスト用オブジェ作成メソッド
  18. {
  19. List<string> testList = new List<string> { "a", "b" ,"あ","ん"};
  20. Testclass jikken;
  21. jikken = new Testclass();
  22. jikken.youso = testList;
  23. return jikken.test();
  24. }
  25. }
  26.  
  27. public class Testclass//クラスと配列のテスト用
  28. {
  29. public List<string> youso = new List<string>();
  30. string modori;
  31. public string test()
  32. {
  33. modori = string.Join(",", youso);
  34. modori = modori + "-" + modori;
  35. return modori;
  36. }
  37.  
  38. }
  39.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
public partial class Form1 : Form
       ^
Main.java:1: error: '{' expected
public partial class Form1 : Form
                          ^
Main.java:19: error: '(' or '[' expected
            List<string> testList = new List<string> { "a", "b" ,"?","?"};
                                                     ^
Main.java:19: error: not a statement
            List<string> testList = new List<string> { "a", "b" ,"?","?"};
                                                       ^
Main.java:19: error: ';' expected
            List<string> testList = new List<string> { "a", "b" ,"?","?"};
                                                          ^
Main.java:21: error: <identifier> expected
            jikken = new Testclass();
                  ^
Main.java:22: error: <identifier> expected
            jikken.youso = testList;
                        ^
Main.java:23: error: illegal start of type
            return jikken.test();
            ^
Main.java:23: error: ';' expected
            return jikken.test();
                  ^
Main.java:23: error: illegal start of type
            return jikken.test();
                         ^
Main.java:25: error: class, interface, or enum expected
    }
    ^
11 errors
stdout
Standard output is empty