How to check if the value in the array is higher. My case I have Designpoints count =12 and FromNode value =11. The problem is that DesignPoints(12) does not exist since Designpoints start count from 0.I get an error in "If Designpoints(FromNode + 1).tag = "WALL" Then" Gets and error "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"
For gcount = 0 To GroundPoints.Count - 2
For Dcount = 0 To Designpoints.Count - 2
If Designpoints(FromNode + 1).tag = "WALL" Then
polygon.PolyGonType = XpolyType.StructureCut
customPolygon.Add(polygon)
Else
Is there any way to check if the FromNode value is always less than the Designpoints value. I tried to check the condition like
If Designpoints.count > FromNode + 1 And Designpoints(FromNode + 1).tag = "WALL" Then
Also tried putting "Designpoints(FromNode + 1).tag = "WALL" " inside the "If Designpoints.count > FromNode + 1" loop