Most of the example code i have seen does something like this:
However, accessing parameters by index is error prone, as you have to keep track of the index used if you add more parameters or change the order.
Is it possible to do something like this instead?
I tried this and while it compiles fine, the value of foo in this example is not as expected. Using Parameters[index] works as expected.
CODE:
AddParameter(...) ... int foo = Parameters[0].AsInt;
However, accessing parameters by index is error prone, as you have to keep track of the index used if you add more parameters or change the order.
Is it possible to do something like this instead?
CODE:
Parameter myParam = AddParameter(...) ... int foo = myParam.AsInt;
I tried this and while it compiles fine, the value of foo in this example is not as expected. Using Parameters[index] works as expected.
Rename
The "ParameterList" collection allows to access the values by parameter name i.e. FindByOptParamName:
https://www.wealth-lab.com/Support/ApiReference/ParameterList
https://www.wealth-lab.com/Support/ApiReference/ParameterList
QUOTE:Do you have a full example of when it doesn't work? I've just done this about 200 times (not kidding) and haven't had a problem.
I tried this and while it compiles fine, the value of foo in this example is not as expected. Using Parameters[index] works as expected.
Your Response
Post
Edit Post
Login is required