Class Price
Inheritance
System.Object
Price
Namespace: System.Dynamic.ExpandoObject
Assembly: stellar-dotnet-sdk.dll
Syntax
public class Price : object
Constructors
Price(Int32, Int32)
Create a new price. Price in Stellar is represented as a fraction.
Declaration
public Price(int n, int d)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | n | Numerator |
| System.Int32 | d | Denominator |
Properties
Denominator
Declaration
public int Denominator { get; }
Property Value
|
System.Int32
|
Numerator
Declaration
public int Numerator { get; }
Property Value
|
System.Int32
|
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj |
Returns
|
System.Boolean
|
FromString(String)
Approximates
price to a fraction.
Declaration
public static Price FromString(string price)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | price | Example 1.25 |
Returns
|
Price
|
FromXdr(Price)
Create Price from XDR.
Declaration
public static Price FromXdr(Price price)
Parameters
| Type | Name | Description |
|---|---|---|
| stellar_dotnet_sdk.xdr.Price | price | Price XDR object. |
Returns
|
Price
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
|
System.Int32
|
ToXdr()
Generates Price XDR object.
Declaration
public Price ToXdr()
Returns
|
stellar_dotnet_sdk.xdr.Price
|