Table of Contents

Subtract Method

Definition

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

Subtract<T>(T, T)

Performs a binary subtraction of the two specified values.

public static T Subtract<T>(T x, T y) where T : struct, IConvertible

Parameters

x T

The minuend.

y T

The subtrahend.

Returns

T

The result of subtracting y from x.

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.

OverflowException

The sum of x and y is less than or greater than the by T valid MinValue and MaxValue.