Mono Class Library: System.Math Overview | Members

System.Math.Abs Method

Returns the absolute value of the specified sbyte.

[System.CLSCompliant(false)]
public static sbyte Abs (sbyte value)

Parameters

value
A sbyte.

Returns

A sbyte containing the absolute value of value.

Exceptions

TypeReason
OverflowExceptionvalue equals sbyte.MinValue.

Remarks

This method is not CLS-compliant. For a CLS-compliant alternative, use Math.Abs(sbyte)(short).

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0