Math.Log Method returns the natural (base e) logarithm of a specified number.
using System; public class Example { public static void Main() { double[] XArgs = { 1.2, 4.9, 9.9, 0.1 }; foreach (double argX in XArgs) { Console.WriteLine(Math.Log(argX)); Console.WriteLine(Math.Log(Math.E, argX)); } } }