public static void Assert(bool assertion) { if (UseExceptions) { if (!assertion) throw new AssertionException("Assertion failed."); } else { Trace.Assert(assertion, "Assertion failed."); } }