fork download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. string s = null;
  9. string extension = s.Split('.').LastOrDefault();
  10. Console.WriteLine(extension.TrimEnd());
  11. if (extension == "zip")
  12. {
  13. Console.WriteLine("Meep!");
  14. }
  15. }
  16. }
Runtime error #stdin #stdout #stderr 0.02s 13816KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at Test.Main () [0x00002] in <93807f165a52434196f742dcb6e04046>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
  at Test.Main () [0x00002] in <93807f165a52434196f742dcb6e04046>:0