Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/297.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# For循环不';t向点集合添加值_C#_For Loop_Arcgis - Fatal编程技术网

C# For循环不';t向点集合添加值

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

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[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另一个问题是什么?