예제 #1
0
        public static void Main(string[] args)
        {
            var nahodneCisla = new NahodneCisla();
            var data         = new Dictionary <LogicSettings, string>();

            data.Add(new LogicSettings(true)
            {
                B = true,
                C = true
            }, "first");

            data.Add(new LogicSettings
            {
                A = false,
                B = true,
                C = false
            }, "second");

            var findByKey = data[new LogicSettings
                                 {
                                     A = false,
                                     B = true,
                                     C = false,
                                 }];

            Console.WriteLine("dictionary: " + findByKey);

            foreach (var cislo in nahodneCisla.ListCisel)
            {
                Console.WriteLine("konstruktor přebira cislo: " + cislo);
            }

            var image = new Image(nahodneCisla);

            Console.WriteLine("Cislo Image: " + image.Cisla);

            Console.ReadKey();
        }
예제 #2
0
 public Image(NahodneCisla nahodneCisla)
 {
     Cisla = nahodneCisla.ListCisel.FirstOrDefault();
 }