Struct CountryId
Type-safe country identifier Prevents mixing up country IDs with other entity IDs at compile time Following data-linking-architecture.md specifications
[Serializable]
public readonly struct CountryId
Constructors
CountryId(ushort)
public CountryId(ushort value)
Parameters
valueushort
Fields
None
Special constant for no country/unowned
public static readonly CountryId None
Field Value
Value
public readonly ushort Value
Field Value
- ushort
Properties
IsValid
Check if this is a valid country ID (not none/zero)
public bool IsValid { get; }
Property Value
- bool
Methods
Equals(CountryId)
public bool Equals(CountryId other)
Parameters
otherCountryId
Returns
- bool
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
- bool
GetHashCode()
public override int GetHashCode()
Returns
- int
ToString()
public override string ToString()
Returns
- string
Operators
operator ==(CountryId, CountryId)
public static bool operator ==(CountryId left, CountryId right)
Parameters
Returns
- bool
implicit operator ushort(CountryId)
public static implicit operator ushort(CountryId id)
Parameters
idCountryId
Returns
- ushort
implicit operator CountryId(ushort)
public static implicit operator CountryId(ushort value)
Parameters
valueushort
Returns
operator !=(CountryId, CountryId)
public static bool operator !=(CountryId left, CountryId right)
Parameters
Returns
- bool