private static void validateRandomChoice(StrategyChoice startStrategy, ref bool differentResult, ref RandomChoice p) { //Check one of the two valid values is found. // bool foundValidValue = false; var x = p.Step(startStrategy); for (int i = 0; i < 5; i++) { p = new RandomChoice(); var xr = p.Step(startStrategy); if (x != xr) { differentResult = true; break; } } }