Table of Contents

Class QuestionCollection

Namespace
Tudormobile.OpenTrivia.UI.ViewModels
Assembly
Tudormobile.OpenTrivia.UI.dll

Represents a collection of selectable trivia questions, each assigned a unique sequential number for identification and ordering.

public class QuestionCollection : ObservableCollection<SelectableQuestion>, IList<SelectableQuestion>, ICollection<SelectableQuestion>, IList, ICollection, IReadOnlyList<SelectableQuestion>, IReadOnlyCollection<SelectableQuestion>, IEnumerable<SelectableQuestion>, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged
Inheritance
QuestionCollection
Implements
Inherited Members

Remarks

The collection is initialized with a set of trivia questions, each wrapped in a SelectableQuestion object. The collection automatically assigns a sequential number to each question as it is added. This class is intended to simplify the management and presentation of trivia questions in user interfaces or quiz applications.

Constructors

QuestionCollection(IEnumerable<TriviaQuestion>)

Initializes a new instance of the QuestionCollection class using the specified collection of trivia questions.

public QuestionCollection(IEnumerable<TriviaQuestion> triviaQuestions)

Parameters

triviaQuestions IEnumerable<TriviaQuestion>

An enumerable collection of TriviaQuestion objects to be added to the collection. This parameter cannot be null.

Remarks

Each trivia question in the collection is wrapped in a SelectableQuestion and assigned a unique question number for identification.