Struct Percentage
Percentage struct type for handling percentages
Implements
Inherited Members
Namespace: FpAssistantCore.General
Assembly: FpAssistantCoreScl.dll
Syntax
public struct Percentage : IEquatable<Percentage>
Constructors
View SourcePercentage(double)
Handle percentages
Declaration
public Percentage(double percentage)
Parameters
Type | Name | Description |
---|---|---|
double | percentage | Value of the percentage between 0 and 100% |
Properties
View SourceValue
Declaration
public double Value { get; set; }
Property Value
Type | Description |
---|---|
double |
Methods
View SourceEquals(Percentage)
Status of Equals
Declaration
public bool Equals(Percentage percentage)
Parameters
Type | Name | Description |
---|---|---|
Percentage | percentage | Percentage object |
Returns
Type | Description |
---|---|
bool | True is they are the same, otherwise false including when obj is null |
Equals(object)
Status of Equals
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | object |
Returns
Type | Description |
---|---|
bool | True is they are the same, otherwise false including when obj is null |
Overrides
View SourceGetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
View SourcePercentageOf(double)
Calculate the percentage of a value
Declaration
public double PercentageOf(double value)
Parameters
Type | Name | Description |
---|---|---|
double | value | Value that percentage will be applied |
Returns
Type | Description |
---|---|
double | double: Percentage of the value |
Operators
View Sourceoperator /(Percentage, double)
Operator division of a percentage object and double
Declaration
public static double operator /(Percentage percentage, double value)
Parameters
Type | Name | Description |
---|---|---|
Percentage | percentage | First operand of the division |
double | value | Second operand of the division |
Returns
Type | Description |
---|---|
double | double object of division |
operator ==(Percentage, Percentage)
Declaration
public static bool operator ==(Percentage a1, Percentage a2)
Parameters
Type | Name | Description |
---|---|---|
Percentage | a1 | |
Percentage | a2 |
Returns
Type | Description |
---|---|
bool |
operator !=(Percentage, Percentage)
Declaration
public static bool operator !=(Percentage a1, Percentage a2)
Parameters
Type | Name | Description |
---|---|---|
Percentage | a1 | |
Percentage | a2 |
Returns
Type | Description |
---|---|
bool |
operator *(Percentage, double)
Operator multiplication of a percentage object and double
Declaration
public static double operator *(Percentage percentage, double value)
Parameters
Type | Name | Description |
---|---|---|
Percentage | percentage | First operand of the multiplication |
double | value | Second operand of the multiplication |
Returns
Type | Description |
---|---|
double | double object of multiplication |