Struct Household.RandomPerson
A helper struct used for RandomConstellations to refer to a person of a given Type with the given AgeGroup.
public readonly record struct Household.RandomPerson : IEquatable<Household.RandomPerson>
- Implements
- Inherited Members
- Extension Methods
Constructors
RandomPerson(Type, AgeGroup)
A helper struct used for RandomConstellations to refer to a person of a given Type with the given AgeGroup.
public RandomPerson(Type Type, AgeGroup Age)
Parameters
Properties
Age
The age group.
public AgeGroup Age { get; init; }
Property Value
Type
The person type, as registered into Types.
public Type Type { get; init; }
Property Value
Methods
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
implicit operator RandomPerson(AgeGroup)
Converts the given age into a Household.RandomPerson of type Person.
public static implicit operator Household.RandomPerson(AgeGroup age)
Parameters
ageAgeGroupThe age group.
Returns
- Household.RandomPerson
A Household.RandomPerson with the given age and the type Person.