private void button1_Click(object sender, EventArgs e) { length = Convert.ToInt32(textBox1.Text); arr = new Linear_Array(); arr.Create(length); button1.Visible = false; textBox1.ReadOnly = true; label1.Text = "Размерность массива:"; textBox2.Visible = true; label2.Visible = true; button2.Visible = true; }
public static void Input(Linear_Array arr) { Console.WriteLine("Введите размер массива"); int length = Convert.ToInt32(Console.ReadLine()); arr.Create(length); for (int i = 0; i < length; i++) { Console.Write("Введите {0} элемент массива - ", i + 1, "/n"); arr.Arr[i] = new Element(Convert.ToInt32(Console.ReadLine())); } Console.WriteLine("МАССИВ: " + arr.Print()); }