Mono Class Library: System.Math Overview | Members

System.Math.Abs Method

Returns the absolute value of the specified sbyte. [Edit]

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

Parameters

value
A sbyte. [Edit]

Returns

A sbyte containing the absolute value of value. [Edit]

Exceptions

TypeReason
OverflowExceptionvalue equals sbyte.MinValue. [Edit]

Remarks

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

Requirements

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