Table of Contents

Class TriviaCategory

Namespace
Tudormobile.OpenTrivia
Assembly
Tudormobile.OpenTrivia.dll

Represents a trivia category.

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

Constructors

TriviaCategory()

public TriviaCategory()

TriviaCategory(TriviaCategory)

[SetsRequiredMembers]
protected TriviaCategory(TriviaCategory original)

Parameters

original TriviaCategory

Properties

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Id

The unique identifier for the category.

public int Id { get; init; }

Property Value

int

Name

The name of the category.

public required string Name { get; init; }

Property Value

string

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(TriviaCategory?)

public virtual bool Equals(TriviaCategory? other)

Parameters

other TriviaCategory

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

Returns the name of the trivia category.

public override string ToString()

Returns

string

The name of the category.

Operators

operator ==(TriviaCategory?, TriviaCategory?)

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

Parameters

left TriviaCategory
right TriviaCategory

Returns

bool

operator !=(TriviaCategory?, TriviaCategory?)

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

Parameters

left TriviaCategory
right TriviaCategory

Returns

bool