Share via


Math.Abs Method

Returns the absolute value of a specified integer.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

public static int Abs (
         int val
)

Parameters

  • val
    A number between the minimum and maximum allowable values for an integer.

Return Value

The absolute value of a specified integer.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, 4.1, and 4.2.

See Also

Reference

Math Class
Math Members
System Namespace