private void _initiateTest(Type test) { if (_currentTest != null) { _currentTest.Destroy(); } Window.Title = test.Name; try { _currentTest = (GameElement)Activator.CreateInstance(test); Instance.Create(_currentTest); } catch (TargetInvocationException ex) { System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(ex.InnerException).Throw(); throw new Exception("Unreachable code reached"); // Unreachable } }