fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. // your code goes here
  8. string s1=null;
  9. string s2=string.Empty;
  10.  
  11. Console.WriteLine(s2.Trim());
  12. Console.WriteLine(s2.Trim().Length);
  13.  
  14. // Console.WriteLine(s1.Trim());
  15. // Console.WriteLine(Convert.ToString(s1).Trim());
  16. }
  17. }
Runtime error #stdin #stdout #stderr 0.04s 26856KB
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 () [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
  at Test.Main () [0x00000] in <filename unknown>:0