24 - Üç Boyutlu Dizi Örneği - Yurt Odası
namespace oda_Kira
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
string[, ,] ozelYurt = new string[2, 3, 2]
{
{{"1A1","1A2"},{"1B1","1B2"},{"1C1","1C2"}},
{{"2A1","2A2"},{"2B1","2B2"},{"2C1","2C2"}}
};
string[, ,] ozelYurtIndex = new string[2, 3, 2]
{
{{"000","001"},{"010","011"},{"020","021"}},
{{"100","101"},{"110","111"},{"120","121"}}
};
string[, ,] odaDurum = new string[2, 3, 2]
{
{{"DOLU","DOLU"},{"DOLU","DOLU"},{"DOLU","DOLU"}},
{{"DOLU","BOŞ"},{"BOŞ","DOLU"},{"DOLU","DOLU"}}
};
private void button1_Click(object sender, EventArgs e)
{
foreach (var item in ozelYurt)
{
listBox1.Items.Add(item);
}
foreach (var item in odaDurum)
{
listBox2 .Items.Add(item);
}
}
}

Yorumlar
Yorum Gönder