var foo = new Foo<double>(1.5d);
foo.LogToConsole("Hello world");
foo.LogtoFile("Hello world");
var result1 = Foo<double>.DoCalc(1, 2);
static protected T StartValue { get; private set; }
public static int DoCalc(object arg1, T arg2)
return (int)arg1 + Convert.ToInt32(arg2) / Convert.ToInt32(StartValue);
public static int higherOrderCalculation(Func<int, int, int> Func, int one, int two)
public void LogToConsole(string message)
Console.WriteLine(string.Format(message));
public async void LogtoFile(string msg)
await File.AppendAllTextAsync($"logfile{DateTime.Now.ToString("yyyy-mm-dd")}.log", "msg");