IOperator

Ecng.Common

Provides strongly-typed arithmetic operations and comparison functionality.

Implements: IComparer<T>, IOperator, IComparer

Methods

Add
public T Add(T first, T second)
result = iOperator.Add(first, second)

Adds two values of type T.

first
The first value.
second
The second value.

Returns: The result of addition.

Divide
public T Divide(T first, T second)
result = iOperator.Divide(first, second)

Divides the first value by the second.

first
The first value.
second
The second value.

Returns: The result of division.

Multiply
public T Multiply(T first, T second)
result = iOperator.Multiply(first, second)

Multiplies two values of type T.

first
The first value.
second
The second value.

Returns: The result of multiplication.

Subtract
public T Subtract(T first, T second)
result = iOperator.Subtract(first, second)

Subtracts the second value from the first.

first
The first value.
second
The second value.

Returns: The result of subtraction.