C# Calc with functions