Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
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); }
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); }