All pastes #816634 Raw Edit

Untitled

public text v1 · immutable
·published 2007-12-14 21:57 UTC
rendered paste body
using System;

public class Ex {

        int p;

        public static int test1 () {
                Ex x = null;

                try {
                        Console.WriteLine(" before");
                        x.p = 1;
                        Console.WriteLine(" after");
                } catch (NullReferenceException) {
                        Console.WriteLine("catched");
                        return 0;
                }
                Console.WriteLine("Not catched");
                return 1;
        }

         public static int Main () {
              test1();
                return 0;
         }

}


Output: 

$ mono a.exe 
 before
  <here cpu is used 100%>