コード例 #1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="PollQuestion" /> class.
 /// </summary>
 /// <param name="index">The index.</param>
 /// <param name="question">The question.</param>
 /// <param name="aType">a type.</param>
 /// <param name="answers">The answers.</param>
 /// <param name="correctAnswer">The correct answer.</param>
 internal PollQuestion(uint index, string question, int aType, IEnumerable <string> answers, string correctAnswer)
 {
     Index         = index;
     Question      = question;
     AType         = (PollAnswerType)aType;
     Answers       = answers.ToList();
     CorrectAnswer = correctAnswer;
 }
コード例 #2
0
ファイル: PollQuestion.cs プロジェクト: sgf/Yupi
 /// <summary>
 ///     Initializes a new instance of the <see cref="PollQuestion" /> class.
 /// </summary>
 /// <param name="index">The index.</param>
 /// <param name="question">The question.</param>
 /// <param name="aType">a type.</param>
 /// <param name="answers">The answers.</param>
 /// <param name="correctAnswer">The correct answer.</param>
 internal PollQuestion(uint index, string question, int aType, IEnumerable<string> answers, string correctAnswer)
 {
     Index = index;
     Question = question;
     AType = (PollAnswerType) aType;
     Answers = answers.ToList();
     CorrectAnswer = correctAnswer;
 }
コード例 #3
0
ファイル: PollQuestion.cs プロジェクト: xjoao97/HabboRP
 /// <summary>
 ///     Initializes a new instance of the <see cref="PollQuestion" /> class.
 /// </summary>
 /// <param name="index">The index.</param>
 /// <param name="question">The question.</param>
 /// <param name="aType">a type.</param>
 /// <param name="answers">The answers.</param>
 /// <param name="correctAnswer">The correct answer.</param>
 internal PollQuestion(int index, string question, int aType, string answers, string correctAnswer)
 {
     Index          = index;
     Question       = question;
     AType          = (PollAnswerType)aType;
     Answers        = answers.Split(',');
     CorrectAnswers = correctAnswer.Split(',');
 }
コード例 #4
0
ファイル: Types.cs プロジェクト: Nord1sun/poll-system-ex
 public static string GetPollAnswerTypeAsString(PollAnswerType pollAnswerType) =>
 PollAnswerTypes.FirstOrDefault(p => p.Value == pollAnswerType).Key;