Show / Hide Table of Contents

Struct Percentage

Percentage struct type for handling percentages

Implements
IEquatable<Percentage>
Namespace: FpAssistantCore.General
Assembly: FpAssistantCoreScl.dll
Syntax
public struct Percentage

Constructors

View Source

Percentage(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 Source

Value

Declaration
public double Value { get; set; }
Property Value
Type Description
System.Double

Methods

View Source

Equals(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

View Source

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

View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
View Source

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 Source

Division(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

View Source

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
View Source

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
View Source

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<>
  • View Source
In This Article
Back to top Copyright 2018-2024 CADology Limited