The CSE 'GetValue' includes the 'value substitution' feature so that it is possible to call a .Net method and immediately return the result to APL+Win using the CSE GetValue method providing the argument to the method directly as an APL+Win value. Multiple arguments are supported. The APL+Win values must be conformable with the argument types of the .Net method.
⎕cself←'c'⎕cse 'Init' 'System' 29999
⎕cse 'ExecStmt' 'using System;'
0
⎕cse 'ExecStmt' 'public double Add10(double x){return x+10;}' ⍝ Create a .Net method
0
⎕cse 'GetValue' 'Add10({0})' 100 ⍝ Call the method directly
110
⎕cse 'ExecStmt' 'public double AddXandY(double x, double y){return x+y;}' ⍝ Create another .Net method
0
⎕cse 'GetValue' 'AddXandY({0},{1})' 100 10 ⍝ Call the method directly
110
⎕cse 'GetValue' 'Math.Max({0},{1})' 100 10 ⍝ Use a pre-existing .Net method ⍝ Call the method directly
100