Mega Code Archive

 
Categories / VB.Net / Development
 

Math Abs Method returns the absolute value of a Decimal number

Imports System Public Class MainClass     Public Shared Sub Main()     Dim decimals() As Decimal = { 0D, -19.69D,Decimal.MinValue }     For Each value As Decimal In decimals        Console.WriteLine("Abs({0}) = {1}", value, Math.Abs(value))     Next     End Sub  End Class