Struct Coin
- Namespace
- GuildWars2
- Assembly
- GW2SDK.dll
Represents an amount of coins and provides methods to compare and convert coins to other formats.
[JsonConverter(typeof(CoinJsonConverter))]
public readonly record struct Coin : IComparable, IComparable<Coin>, IEquatable<Coin>
- Implements
- Inherited Members
Constructors
- Coin(int, int)
Initializes a new instance of the Coin struct with the specified amount of silver and copper coins.
- Coin(int, int, int)
Initializes a new instance of the Coin struct with the specified amount of gold, silver, and copper coins.
Fields
- Zero
Represents zero coins.
Properties
- Amount
Gets the total value in copper coins.
- Copper
The amount of copper coins.
- Gold
The amount of gold coins.
- Silver
The amount of silver coins.
Methods
- CompareTo(Coin)
Compares the current instance with another Coin value.
- CompareTo(object?)
Compares the current instance with another object.
- GetChatLink()
Gets the chat link representation of the current instance of Coin.
- ToString()
Gets the string representation of the Coin value.
Operators
- operator +(Coin, Coin)
Adds two Coin values.
- operator --(Coin)
Decrements the current instance of Coin by 1.
- operator /(Coin, Coin)
Divides two Coin values.
- operator >(Coin, Coin)
Determines whether one Coin value is greater than another.
- operator >=(Coin, Coin)
Determines whether one Coin value is greater than or equal to another.
- operator ++(Coin)
Increments the current instance of Coin by 1.
- operator <(Coin, Coin)
Determines whether one Coin value is less than another.
- operator <=(Coin, Coin)
Determines whether one Coin value is less than or equal to another.
- operator %(Coin, Coin)
Computes the remainder of dividing two Coin values.
- operator *(Coin, Coin)
Multiplies two Coin values.
- operator -(Coin, Coin)
Subtracts two Coin values.
- operator -(Coin)
Returns the negation of the current instance of Coin.
- operator +(Coin)
Returns the current instance of Coin.