public override bool IsCorrect() { UserAnswer = UserAnswer.ToUpper().Trim(); if (UserAnswer == CorrectAnswer) { return(true); } else { return(false); } }
public override bool IsCorrect() { UserAnswer = UserAnswer.ToUpper().Trim(); char[] UserAnswerArr = UserAnswer.ToCharArray(); char[] CorrectAnswerArr = CorrectAnswer.ToCharArray(); Array.Sort(UserAnswerArr); if (UserAnswerArr.SequenceEqual(CorrectAnswerArr)) { return(true); } else { return(false); } }