Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void button4_Click(object sender, EventArgs e)
- {
- FileInfo plik = new FileInfo("wyjscie.txt");
- StreamReader str_we = plik.OpenText();
- str_we.ReadLine();
- StreamWriter str_wy = new StreamWriter("C:/Users/Damian/Desktop/WindowsFormsApplication1/WindowsFormsApplication1/wyjscie.txt", !checkBox1.Checked);
- for (int i = 0; i < kolekcja.Count; i++)
- {
- if (kolekcja[i] is Drzewo2)
- {
- str_wy.WriteLine(kolekcja[i].Nazwa + "," + kolekcja[i].Rodzaj + "," + ((Drzewo2)kolekcja[i]).Wysokosc);
- }
- else str_wy.WriteLine(kolekcja[i].Nazwa + "," + kolekcja[i].Rodzaj);
- }
- str_we.Close();
- str_wy.Close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement