Skip to main content
added 3 characters in body
Source Link
Spook
  • 181
  • 1
  • 5

C#

Actually I caught myself on mistakenly doing just that :)

public static object Crash(int i) { if (i > 0) return i + 1; else return new ArgumentOutOfRangeException("i"); } public static void Main() { Crash(-1); } 

throw, not return.

C#

Actually I caught myself mistakenly doing just that :)

public static object Crash(int i) { if (i > 0) return i + 1; else return new ArgumentOutOfRangeException("i"); } public static void Main() { Crash(-1); } 

throw, not return.

C#

Actually I caught myself on mistakenly doing just that :)

public static object Crash(int i) { if (i > 0) return i + 1; else return new ArgumentOutOfRangeException("i"); } public static void Main() { Crash(-1); } 

throw, not return.

added 14 characters in body
Source Link
Spook
  • 181
  • 1
  • 5

C#

Actually I caught myself mistakenly doing just that :)

public static object Crash(int i) { if (i > 0) return i + 1; else return new ArgumentOutOfRangeException("i"); } public static void Main() { Crash(-1); } 

throw, not return.

C#

Actually I caught myself mistakenly doing just that :)

public object Crash(int i) { if (i > 0) return i + 1; else return new ArgumentOutOfRangeException("i"); } public void Main() { Crash(-1); } 

throw, not return.

C#

Actually I caught myself mistakenly doing just that :)

public static object Crash(int i) { if (i > 0) return i + 1; else return new ArgumentOutOfRangeException("i"); } public static void Main() { Crash(-1); } 

throw, not return.

Source Link
Spook
  • 181
  • 1
  • 5

C#

Actually I caught myself mistakenly doing just that :)

public object Crash(int i) { if (i > 0) return i + 1; else return new ArgumentOutOfRangeException("i"); } public void Main() { Crash(-1); } 

throw, not return.