fork download
  1. using System;
  2.  
  3. namespace TEST5
  4. {
  5. class MainClass
  6. {
  7. public static void Main (string[] args)
  8. {
  9. System.IO.StreamWriter s = new System.IO.StreamWriter(new System.IO.MemoryStream());
  10. System.Console.SetOut(s);
  11. // MS Implementation: 2
  12. System.Console.WriteLine(System.Console.Out.NewLine.Length);
  13.  
  14. s.NewLine = "\n";
  15. // MS Implementation: 1
  16. System.Console.WriteLine(System.Console.Out.NewLine.Length);
  17.  
  18. // MS Implementation: false
  19. System.Console.WriteLine(s == System.Console.Out);
  20. s.Flush();
  21. s.Close();
  22. }
  23. }
  24. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty