VB.NET 中错误: '值不能转换' 的解决方法
这段代码中的错误是在创建'intersections'对象时未指定其类型。'Point2d'是一个类,而不是一个集合类型。所以应该将'intersections'声明为一个'List(Of Point2d)'或类似的集合类型,然后使用'Add'方法将每个交点添加到集合中。修正后的代码如下:
Dim intersections As New List(Of Point2d)()
For Each intersectionPoint As Point2d In polyline2d
intersections.Add(intersectionPoint)
Next
原文地址: https://www.cveoy.top/t/topic/l1dR 著作权归作者所有。请勿转载和采集!