public QnABundle(Serialization.QnADataBundle data) { Category = data.category; QnAs = new QnA[data.QnADatas.Length]; //error handling? for (int i = 0; i < data.QnADatas.Length; i++) { QnAs[i] = new QnA(data.QnADatas[i]); } }
public void Shuffle() { var rng = new Random(); int n = QnAs.Length; while (n > 1) { int m = rng.Next(n); n--; QnA temp = QnAs[n]; QnAs[n] = QnAs[m]; QnAs[m] = temp; } }
public BeforeQuestionSelected(QnA QnA, QuestionCategory category) { this.QnA = QnA; Category = category; }