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 WindowsFormsApp8
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- public string[,] tablica2D { get; private set; }
- private void button1_Click(object sender, EventArgs e)
- {
- int x = Convert.ToInt32(textBox3.Text);
- int y = Convert.ToInt32(textBox4.Text);
- tablica2D = new string[x, y];
- }
- private void button2_Click(object sender, EventArgs e)
- {
- int x_ = Convert.ToInt32(textBox5.Text);
- int y_ = Convert.ToInt32(textBox1.Text);
- string w = textBox2.Text;
- tablica2D[x_, y_] = w;
- }
- private void button3_Click(object sender, EventArgs e)
- {
- foreach(string element in tablica2D)
- {
- listBox1.Items.Add(element);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement