Using Curve and Line lists with VB Script

Hello everyone, i believe i have a very basic question to answer.

I have two closed planar curves inside of each other, i have divided them with the same number of points.
Then arranged the points to obtain lines which will slice the area between the curves (see the picture).

What i wanna achieve in the first step is to calculate the area of each slice, then i will try to expand the uses of the formula.

I want to achieve this with script to make it also a learning process for VB.Net with grasshopper. But i am having trouble selecting curve segments and lines in a list. To calculate the area of each slice i need to get 2 curve segments and 2 lines. When i try to use the curve and line lists in the VB script as arrays, i am getting errors. (maybe related the way i define the input objects?)

Any help about the solution and any sources/videos suggestions to understand the grasshopper/rhino scripting better would be appreciated.

I’m guessing you might need to right click on the x input, and set it to List Access.

Actually it worked to obtain the list in the way i have been trying to do ( x(i)).
Should i try to keep on using the Array method to create my own list? Or do you suggest any easier/better approach for area calculation?

Thank you so much.

Well … since nobody(?) speaks VB these days get a C# on that matter. (15.7 KB)

BTW: Do a Curve contains Curve check: better safe than sorry.