fork download
  1. using System;
  2.  
  3. class Program {
  4. static void Ensure(Action a) {
  5. a();
  6. }
  7.  
  8. static void Main() {
  9. try {
  10. object events = null;
  11. Ensure(() => { if (events == null) throw new ArgumentNullException("events"); });
  12. } catch (Exception e) {
  13. Console.WriteLine(e.Message);
  14. }
  15. }
  16. }
Success #stdin #stdout 0.03s 36912KB
stdin
Standard input is empty
stdout
Argument cannot be null.
Parameter name: events