INumeric<T>
Namespace: MyClassLib
An interface with a static abstract member and a default static implementation.
public interface INumeric<T> where T : INumeric<T>
Type Parameters
T
The implementing type.
Attributes NullableContextAttribute
Methods
Zero()
A static abstract factory.
static abstract T Zero()
Returns
T
A zero value.
Square(T)
A default static interface method.
static virtual T Square(T x)
Parameters
x T
The value.
Returns
T
The squared value.
Operators
operator +(T, T)
A static abstract operator — implementers must provide an addition operator.
static abstract T operator +(T left, T right)
Parameters
left T
The left operand.
right T
The right operand.
Returns
T
The sum.