Table of Contents

Class TriviaQuestionCount

Namespace
Tudormobile.OpenTrivia
Assembly
Tudormobile.OpenTrivia.dll

Represents the number of trivia questions available in a specific category, broken down by difficulty level.

public record TriviaQuestionCount : IEquatable<TriviaQuestionCount>
Inheritance
TriviaQuestionCount
Implements
Inherited Members

Remarks

Use this record to access the total count of questions as well as the counts for each difficulty level—easy, medium, and hard—within a given trivia category. This information can be used to determine question availability for quiz generation or to display statistics to users.

Constructors

TriviaQuestionCount()

public TriviaQuestionCount()

TriviaQuestionCount(TriviaQuestionCount)

protected TriviaQuestionCount(TriviaQuestionCount original)

Parameters

original TriviaQuestionCount

Properties

EasyQuestionCount

The number of questions available for the specified category that are of "easy" difficulty.

public int EasyQuestionCount { get; init; }

Property Value

int

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

HardQuestionCount

The number of questions available for the specified category that are of "hard" difficulty.

public int HardQuestionCount { get; init; }

Property Value

int

MediumQuestionCount

The number of questions available for the specified category that are of "medium" difficulty.

public int MediumQuestionCount { get; init; }

Property Value

int

TotalQuestionCount

The total number of questions available for the specified category.

public int TotalQuestionCount { get; init; }

Property Value

int

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(TriviaQuestionCount?)

public virtual bool Equals(TriviaQuestionCount? other)

Parameters

other TriviaQuestionCount

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(TriviaQuestionCount?, TriviaQuestionCount?)

public static bool operator ==(TriviaQuestionCount? left, TriviaQuestionCount? right)

Parameters

left TriviaQuestionCount
right TriviaQuestionCount

Returns

bool

operator !=(TriviaQuestionCount?, TriviaQuestionCount?)

public static bool operator !=(TriviaQuestionCount? left, TriviaQuestionCount? right)

Parameters

left TriviaQuestionCount
right TriviaQuestionCount

Returns

bool