Visual Studio 2012 C# Form application using log(base 10) function -
i'm writing program in visual studio 2012 c# form application. want use log(base 10) in calculation after button clicked. saw code , wrote in program giving me error. getting wrong?
public static decimal log10( decimal value )
you need implement function , not declare it:
public static decimal log10(decimal value) { return math.log10((double)value); }
well, can see there's such function built .net framework: math.log10
. don't need reinvent wheel, use it.
Comments
Post a Comment