PriceExtensions

Ecng.ComponentModel

Price extension methods.

Methods

IsFree
public static bool IsFree(Price price)
result = PriceExtensions.IsFree(price)

Determine whether the specified Price is free (zero value).

price
Price

Returns: Returns if the specified Price is free (zero value); otherwise, .

Percents
public static Price Percents(int value)
result = PriceExtensions.Percents(value)

Convert the Int32 to percents.

value
Int32 value.

Returns: Percents.

Percents
public static Price Percents(double value)
result = PriceExtensions.Percents(value)

Convert the Double to percents.

value
Double value.

Returns: Percents.

Percents
public static Price Percents(decimal value)
result = PriceExtensions.Percents(value)

Convert the Decimal to percents.

value
Decimal value.

Returns: Percents.

ToPriceType
public static Price ToPriceType(string str)
result = PriceExtensions.ToPriceType(str)

Convert string to Price.

str
String value of Price.

Returns: Object Price.