C# Class Wolfje.Plugins.SEconomy.Money

A representation of Money in Seconomy. Money objects are toll-free bridged with 64-bit integers (long).
ファイルを表示 Open project: tylerjwatson/SEconomy Class Usage Examples

Public Methods

Method 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 method

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

Money() public method

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

Money() public method

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
return System

Parse() public static method

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"
return Money

ToLongString() public method

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

ToString() public method

Returns the string representation of this money
public ToString ( ) : string
return string

TryParse() public static method

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
return bool