Table of Contents

Interface IOperator<T>

Namespace
Ecng.Common
Assembly
Ecng.Common.dll

Provides strongly-typed arithmetic operations and comparison functionality.

public interface IOperator<T> : IComparer<T>, IOperator, IComparer

Type Parameters

T

The type to operate on.

Inherited Members
Extension Methods

Methods

Add(T, T)

Adds two values of type T.

T Add(T first, T second)

Parameters

first T

The first value.

second T

The second value.

Returns

T

The result of addition.

Divide(T, T)

Divides the first value by the second.

T Divide(T first, T second)

Parameters

first T

The first value.

second T

The second value.

Returns

T

The result of division.

Multiply(T, T)

Multiplies two values of type T.

T Multiply(T first, T second)

Parameters

first T

The first value.

second T

The second value.

Returns

T

The result of multiplication.

Subtract(T, T)

Subtracts the second value from the first.

T Subtract(T first, T second)

Parameters

first T

The first value.

second T

The second value.

Returns

T

The result of subtraction.