using System; using System.Collections.Generic; using System.Text; namespace Lapistik1 { class LapiProov2 { public static void Main(string[] arg) { Riidelapp lapp1 = new Riidelapp(4, 6, "sinine"); Riidelapp riba1 = lapp1.Poolita(1); Riidelapp lapp2 = lapp1.Poolita(); Riidelapp lapp3 = lapp2.Poolita(); Riidelapp[] lapid = new Riidelapp[6]; lapid[0] = riba1; lapid[1] = lapp1; lapid[2] = lapp2; lapid[3] = lapp3; lapid[4] = new Riidelapp(10, 5, "roheline"); lapid[5] = lapid[4].Poolita(3); for (int i = 0; i < lapid.Length; i++) { Console.WriteLine(lapid[i]); } Console.WriteLine(); Riidelapp[] kaltsukott = new Riidelapp[3]; kaltsukott[0] = riba1; kaltsukott[1] = lapid[5].Poolita(); kaltsukott[2] = lapid[5]; foreach (Riidelapp lapp in kaltsukott) { Console.WriteLine(lapp); } } } }