HI Team,
i want to find square roots of a given Array and i am not interested to do multiple Assign activitys…
i want to use Invoke code Activity to obtain the Goal.
i dont have that much hands on using Invoke Code storing and retreiving back the values in Array
the output should be squares stored in Array
postwick
(Paul Ostwick)
February 27, 2024, 1:10pm
2
You can just replace the log message with an activity to store the values in a list or a dictionary (with the original value) etc. Whatever you want.
Yoichi
(Yoichi)
February 27, 2024, 1:23pm
3
Hi,
Can you try the following expression?
arrDouble = New Double(){2,4,6,8}
Then
arrDouble = arrDouble.Select(Function(d) Math.Sqrt(d)).ToArray()
Regards,
Thanks for the solution… but i am more interested using Invoke code so that i can learn passing Array to invoke code and retreiving them
Yoichi
(Yoichi)
February 27, 2024, 2:15pm
5
Hi,
How about the following?
Sample
Sample20240227-2a.zip (2.6 KB)
Regards,
Thanks for the Info… just tried something from my end…
will use your solution
Yoichi
(Yoichi)
February 27, 2024, 2:24pm
7
Hi,
I think Int32 is not very good to calculate square root, because square root 2 will be 1 in int32.
Can you try to use array of Double type instead of int32 array?
Regards,
Yes…Just understood the same.