Struct Percentage
Percentage struct type for handling percentages
Implements
IEquatable<Percentage>
Namespace: FpAssistantCore.General
Assembly: FpAssistantCoreScl.dll
Syntax
public struct Percentage
Constructors
View SourcePercentage(Double)
Handle percentages
Declaration
public Percentage(double percentage)
Parameters
Type | Name | Description |
---|---|---|
System.Double | percentage | Value of the percentage between 0 and 100% |
Properties
View SourceValue
Declaration
public double Value { get; set; }
Property Value
Type | Description |
---|---|
System.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 |
---|---|
System.Boolean | 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 |
---|---|---|
System.Object | obj | object |
Returns
Type | Description |
---|---|
System.Boolean | True is they are the same, otherwise false including when obj is null |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
PercentageOf(Double)
Calculate the percentage of a value
Declaration
public double PercentageOf(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | Value that percentage will be applied |
Returns
Type | Description |
---|---|
System.Double | double: Percentage of the value |
Operators
View SourceDivision(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 |
System.Double | value | Second operand of the division |
Returns
Type | Description |
---|---|
System.Double | double object of division |
Equality(Percentage, Percentage)
Declaration
public static bool operator ==(Percentage a1, Percentage a2)
Parameters
Type | Name | Description |
---|---|---|
Percentage | a1 | |
Percentage | a2 |
Returns
Type | Description |
---|---|
System.Boolean |
Inequality(Percentage, Percentage)
Declaration
public static bool operator !=(Percentage a1, Percentage a2)
Parameters
Type | Name | Description |
---|---|---|
Percentage | a1 | |
Percentage | a2 |
Returns
Type | Description |
---|---|
System.Boolean |
Multiply(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 |
System.Double | value | Second operand of the multiplication |
Returns
Type | Description |
---|---|
System.Double | double object of multiplication |
Implements
IEquatable<>