Advertisement
Tahevix

Tablica 1 Wymiarowa - YouTube

Aug 22nd, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.13 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace WindowsFormsApp7
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         public string[] tablica1D { get; private set; }
  21.         private void textBox1_TextChanged(object sender, EventArgs e)
  22.         {
  23.  
  24.         }
  25.  
  26.         private void button1_Click(object sender, EventArgs e)
  27.         {
  28.             int n = Convert.ToInt32(textBox1.Text);
  29.             tablica1D = new string[n];
  30.  
  31.         }
  32.  
  33.         private void button2_Click(object sender, EventArgs e)
  34.         {
  35.             int q = Convert.ToInt32(textBox3.Text);
  36.             string w = textBox2.Text;
  37.             tablica1D[q] = w;
  38.         }
  39.  
  40.         private void button3_Click(object sender, EventArgs e)
  41.         {
  42.             foreach(string element in tablica1D)
  43.             {
  44.                 listBox1.Items.Add(element);
  45.             }
  46.         }
  47.     }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement