public PowerOfFiveReference(long upto) { _powersOfFive = new long[upto]; _powersOfFives = new PowerOfFive[upto]; for (var i = 0L; i < upto; i++) { _powersOfFives[i] = new PowerOfFive(i + 1); _powersOfFive[i] = _powersOfFives[i].NumberToTheFifth; } }
private void ExecuteCheckAnswer() { var a = new PowerOfFive(AnswerNumber); ShowText = true; PowerText = a.Number.ToString() + "⁵ = " + a.NumberToTheFifth.ToString("N0"); //Check the answer TotalAnswered = TotalAnswered + 1; if (Number.Number == AnswerNumber) { ShowCorrect = true; IsCorrect = true; _numbersLeft.Remove(a.Number - 1); SetNextNumber(); CurrentCorrectCount = CurrentCorrectCount + 1; HighestCorrectCount = Math.Max(HighestCorrectCount, CurrentCorrectCount); TotalCorrect = TotalCorrect + 1; } else { ShowCorrect = false; IsCorrect = false; CurrentCorrectCount = 0; TotalIncorrect = TotalIncorrect + 1; } PercentageCorrect = _totalCorrect*100/_totalAnswered; PercentageIncorrect = _totalIncorrect*100/_totalAnswered; if (View != null) { View.SelectTextboxText(); } }