Example #1
0
        public static void SearchCountry(List <Danni> exam)
        {
            Console.WriteLine("Molq vavedete darjavata po koqto 6te tarsite");
            string tempCountry = Console.ReadLine();
            Danni  result      = exam.Where(item => item.Country == tempCountry).FirstOrDefault();

            Console.WriteLine(result);
        }
Example #2
0
        public static void SearchCapitalCity(List <Danni> exam)
        {
            Console.WriteLine("Molq vavedete stolicata po koqto 6te tarsite");
            string tempCapital = Console.ReadLine();
            Danni  result      = exam.Where(item => item.CapitalCity == tempCapital).FirstOrDefault();

            Console.WriteLine(result);
        }
Example #3
0
        public static void AddDanni()
        {
            Console.WriteLine("vavedete stolica:");
            string capitalCity = Console.ReadLine();

            Console.WriteLine("vavedete darjava");
            string country = Console.ReadLine();
            Danni  entry   = new Danni(capitalCity, country);

            exam.Add(entry);
            WriteToFile(exam, filename, false);
        }
Example #4
0
        public static void RedaktiraneNaZapis(List <Danni> exam)
        {
            Console.WriteLine("Molq vavedete darjavata koqto iskate da promenite");
            string tempCountry = Console.ReadLine();
            Danni  result      = exam.Where(item => item.Country == tempCountry).FirstOrDefault();

            Console.WriteLine("Molq vavedete novata stolica");
            result.CapitalCity = Console.ReadLine();
            Console.WriteLine("molq vavedete novata darjava");
            result.Country = Console.ReadLine();
            WriteToFile(exam, filename, false);
        }