Table of Contents

Calculate Method

Definition

Namespace
Cuemon
Assemblies
Cuemon.Core.dll
Source
src/Cuemon.Core/Calculator.cs

Calculate<T>(T, AssignmentOperator, T)

Performs a calculation following the assignment of the two specified values.

public static T Calculate<T>(T x, AssignmentOperator assignment, T y) where T : struct, IConvertible

Parameters

x T

The value to calculate with y.

assignment AssignmentOperator

One of the enumeration values that specifies the rules to apply for the assignment operator of x and y.

y T

The value to calculate with x.

Returns

T

The result of the assignment for x and y.

Type Parameters

T

The type of the values for the operand operation.

Exceptions

TypeArgumentException

T is outside the range of allowed types.
Allowed types are: byte, decimal, double, short, int, long, sbyte, float, ushort, uint or ulong.