C# Класс Wolfje.Plugins.SEconomy.Money

A representation of Money in Seconomy. Money objects are toll-free bridged with 64-bit integers (long).
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

Money() публичный Метод

Initializes a new instance of Money and copies the amount specified in it.
public Money ( Money money ) : System
money Money
Результат System

Money() публичный Метод

Initalizes a new instance of money with the specified amount in integer form.
public Money ( long money ) : System
money long
Результат System

Money() публичный Метод

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
Результат System

Parse() публичный статический Метод

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"
Результат Money

ToLongString() публичный Метод

Returns a long representation of this Money object.
public ToLongString ( bool ShowNegativeSign = false ) : string
ShowNegativeSign bool
Результат string

ToString() публичный Метод

Returns the string representation of this money
public ToString ( ) : string
Результат string

TryParse() публичный статический Метод

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
Результат bool