fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.IO;
  6. using System.Text;
  7. using System.Windows.Forms;
  8.  
  9. namespace test
  10. {
  11. public class test
  12. {
  13. [STAThread]
  14. public static void Main()
  15. {
  16. Application.EnableVisualStyles();
  17. Application.SetCompatibleTextRenderingDefault(false);
  18.  
  19. using (var writer = new StreamWriter("test1.txt", false, Encoding.UTF8))
  20. {
  21. writer.WriteLine("UTF8");
  22. writer.WriteLine("あいうえお");
  23. }
  24.  
  25. File.WriteAllText("test2.txt", "ShiftJis\r\nあいうえお", Encoding.GetEncoding("shift-jis"));
  26.  
  27. var form = new Form();
  28.  
  29.  
  30. var browser1 = new WebBrowser();
  31. browser1.Dock = DockStyle.Fill;
  32. browser1.Url = new Uri(Path.GetFullPath("test1.txt"));
  33.  
  34. var browser2 = new WebBrowser();
  35. browser2.Dock = DockStyle.Fill;
  36. browser2.Url = new Uri(Path.GetFullPath("test2.txt"));
  37.  
  38. var split = new SplitContainer();
  39. split.Orientation = Orientation.Horizontal;
  40. split.Dock = DockStyle.Fill;
  41. split.Panel1.Controls.Add(browser1);
  42. split.Panel2.Controls.Add(browser2);
  43.  
  44. form.Controls.Add(split);
  45. Application.Run(form);
  46. }
  47. }
  48. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(4,14): error CS0234: The type or namespace name `Drawing' does not exist in the namespace `System'. Are you missing an assembly reference?
prog.cs(7,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
Compilation failed: 2 error(s), 0 warnings
stdout
Standard output is empty