C# For循环不';t向点集合添加值
for循环不会向“我的点”集合添加任何值:C# For循环不';t向点集合添加值,c#,for-loop,arcgis,C#,For Loop,Arcgis,for循环不会向“我的点”集合添加任何值: Esri.ArcGISRuntime.Geometry.PointCollection VMM40Points = new Esri.ArcGISRuntime.Geometry.PointCollection(Spatialreference); for (int i = 1; i == xyz.Count/3; i += 3) { VMM40Points.Add(xyz
Esri.ArcGISRuntime.Geometry.PointCollection VMM40Points = new Esri.ArcGISRuntime.Geometry.PointCollection(Spatialreference);
for (int i = 1; i == xyz.Count/3; i += 3)
{
VMM40Points.Add(xyz[i - 1], xyz[i], xyz[i + 1]);
}
这是调试器:将条件更改为
i
for循环的“while”部分不正确:它在条件为true时运行,直到
我不知道你为什么有[I-1]
。有什么特别的原因吗?如果没有,则会使循环条件变得非常复杂
var VMM40Points = new Esri.ArcGISRuntime.Geometry.PointCollection(Spatialreference);
for (int i = 0; i < xyz.Count; i+=3)
{
VMM40Points.Add(xyz[i], xyz[i + 1], xyz[i + 2]);
}
var VMM40Points=新Esri.ArcGISRuntime.Geometry.PointCollection(空间参考);
对于(int i=0;i
这只是一个问题。不劳而获-1@ShaiCohen另一个问题是什么?