Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WindowsFormsApp7
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- public string[] tablica1D { get; private set; }
- private void textBox1_TextChanged(object sender, EventArgs e)
- {
- }
- private void button1_Click(object sender, EventArgs e)
- {
- int n = Convert.ToInt32(textBox1.Text);
- tablica1D = new string[n];
- }
- private void button2_Click(object sender, EventArgs e)
- {
- int q = Convert.ToInt32(textBox3.Text);
- string w = textBox2.Text;
- tablica1D[q] = w;
- }
- private void button3_Click(object sender, EventArgs e)
- {
- foreach(string element in tablica1D)
- {
- listBox1.Items.Add(element);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement