C# Class Wolfje.Plugins.SEconomy.Money

A representation of Money in Seconomy. Money objects are toll-free bridged with 64-bit integers (long).
Afficher le fichier Open project: tylerjwatson/SEconomy Class Usage Examples

Méthodes publiques

Méthode Description
Money ( Money money ) : System

Initializes a new instance of Money and copies the amount specified in it.

Money ( long money ) : System

Initalizes a new instance of money with the specified amount in integer form.

Money ( uint Platinum, uint Gold, int Silver, int Copper ) : System

Makes a new money object based on the supplied platinum, gold, silver, and copper.

Parse ( string MoneyRepresentation ) : Money

Parses a money representation into a Money object. Will throw exception if parsing fails.

ToLongString ( bool ShowNegativeSign = false ) : string

Returns a long representation of this Money object.

ToString ( ) : string

Returns the string representation of this money

TryParse ( string MoneyRepresentation, Money &Money ) : bool

Tries to parse Money out of a money representation.

Method Details

Money() public méthode

Initializes a new instance of Money and copies the amount specified in it.
public Money ( Money money ) : System
money Money
Résultat System

Money() public méthode

Initalizes a new instance of money with the specified amount in integer form.
public Money ( long money ) : System
money long
Résultat System

Money() public méthode

Makes a new money object based on the supplied platinum, gold, silver, and copper.
public Money ( uint Platinum, uint Gold, int Silver, int Copper ) : System
Platinum uint
Gold uint
Silver int
Copper int
Résultat System

Parse() public static méthode

Parses a money representation into a Money object. Will throw exception if parsing fails.
public static Parse ( string MoneyRepresentation ) : Money
MoneyRepresentation string The money representation string, eg "1p1g", or "30s20c"
Résultat Money

ToLongString() public méthode

Returns a long representation of this Money object.
public ToLongString ( bool ShowNegativeSign = false ) : string
ShowNegativeSign bool
Résultat string

ToString() public méthode

Returns the string representation of this money
public ToString ( ) : string
Résultat string

TryParse() public static méthode

Tries to parse Money out of a money representation.
public static TryParse ( string MoneyRepresentation, Money &Money ) : bool
MoneyRepresentation string The money representation string, eg "1p1g", or "30s20c"
Money Money
Résultat bool