How to read input from a textbox and store the data as first element in 3D array?

## All 4 Replies

``````double[,,] phs = new double[14,0,0];
TextBox168.Text = Convert.ToString(p1);
phs[0,0,0] = p1;
phs[1, 0, 0] = Convert.ToDouble(TextBox1.Text);
phs[2, 0, 0] = Convert.ToDouble(TextBox2.Text);
phs[3, 0, 0] = Convert.ToDouble(TextBox3.Text);
phs[4, 0, 0] = Convert.ToDouble(TextBox4.Text);
phs[5, 0, 0] = Convert.ToDouble(TextBox5.Text);
phs[6, 0, 0] = Convert.ToDouble(TextBox6.Text);
phs[7, 0, 0] = Convert.ToDouble(TextBox7.Text);
phs[8, 0, 0] = Convert.ToDouble(TextBox8.Text);
phs[9, 0, 0] = Convert.ToDouble(TextBox9.Text);
phs[10, 0, 0] = Convert.ToDouble(TextBox10.Text);
phs[11, 0, 0] = Convert.ToDouble(TextBox11.Text);
phs[12, 0, 0] = Convert.ToDouble(TextBox12.Text);
phs[13, 0, 0] = Convert.ToDouble(TextBox13.Text);
``````

`double[,,] phs = new double[14,0,0];`
Could you please tell me what your intention is when creating a 3D array, of doubles where the second and third dimension are zero?
And why you are assigning a string to the first item of the first dimension `phs[0,0,0]` instead of a double?

Well I don't think your code is VB.NET, I think that's a C#.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.