In this example, the function Query is a static function in the running assembly.
// Normal math functionsint value = 15 + 45 * 34;// Reference an equation in the history panelint reference = Query("001");// Return the final solutionreturn value + reference;
// Normal math functionsint value = 15 + 45 * 34;// Reference an equation in the history panelint reference = Query("001");// Return the final solutionreturn value + reference;
namespace MathNotationTool.Extensions{ public static class CodeExt { public static decimal Query(string entry) { return ViewModel.Calculator.ViewModel.History.Where(x => x.Name == entry).FirstOrDefault()?.Value ?? 0; } }}
namespace MathNotationTool.Extensions{ public static class CodeExt { public static decimal Query(string entry) { return ViewModel.Calculator.ViewModel.History.Where(x => x.Name == entry).FirstOrDefault()?.Value ?? 0; } }}
Currently I'm setting the default code options in the startup function:
But this doesn't seem to work. The function isn't recognized, and importing the namespace in the executing code fails in the same way (namespace/assembly not found).
Is there a way to import a static class into the memory-runtime?