private void AddBtn_Click(object sender, EventArgs e) { int n; try { n = HorList.SelectedIndices[0]; } catch { return; } dataN++; DataList.Items.Add("Input-" + dataN + "(" + n + ")"); Console.WriteLine(String.Join(",", outputtype.getOutput(n))); /* * double[] d=new double[10]; * for (int i=0; i < 10; i++) * d[i] = 0; * d[n] = 1; */ UserInput u = new UserInput(BoolToDouble(InputBox.GetArray()), outputtype.getOutput(n)); myList.Add(u); InputBox.Clear(); }