program of absolute value in c# code example Example: c# convert to absolute value Console.WriteLine($"{Math.Abs(value)}"); // -392 --> 392