0
的我已创建了一个对象数组作为这样:打印索引对象
object[,] Values = new object[17, 5];
Layer1[0, 0] = neuron1;
Layer1[1, 0] = neuron1;
Layer1[2, 0] = neuron2;
等
我已经通过对象阵列被写入的功能的循环:
static void Loop_Through_Layer(object[,] Layer1)
{
//Loop through objects in array
foreach (object element in Layer1)
{
if (element != null)
{
//Loop through objects in array
foreach (object index in Layer1)
{
if (index != null)
{
//Need to print indexes of values
Console.ReadLine();
}
}
}
}
}
我正在尝试这么做,所以通过使用for循环打印对象数组中每个值的位置,但我不确定如何引用这些坐标?
谢谢!两种方法都有效。 – user3365114