using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {

        }

        public static void DataRead()
        {
            string path = @"C:\Users\szabomarton\Desktop\C#\ProgaOra\20240905\adatok-utf8.txt";
            FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read);
            StreamReader streamReader = new StreamReader(fileStream);

            string line = streamReader.ReadLine();
            line = streamReader.ReadLine();

            while (line != null)
            {
                string[] datas = line.Split(';');

                string orszag = datas[0];
                int terulet = Convert.ToInt32(datas[1]);

                int i_nepesseg;
                string nepesseg = datas[2];
                bool IsNum = Int32.TryParse(nepesseg, out i_nepesseg);

                if (!IsNum)
                {
                    nepesseg.Replace("g", "0000");
                    i_nepesseg = Convert.ToInt32(nepesseg);
                }



            }

            streamReader.Close();
            fileStream.Close();
        }
    }


    public static class Data
    {
        public static List<Orszag> orszagok = new List<Orszag>(); 
    }
    public class Orszag
    {
        public string Orszagnev { get; private set; }
        public int Terulet { get; private set; }
        public int Nepesseg { get; private set; }
        public string Fovaros { get; private set; }
        public int FovarosNepesseg { get; private set; }

        public bool FovarosiKoncentracio { get; set; }

        public Orszag(string orszagnev, int terulet, int nepesseg, string fovaros, int fovarosNepesseg)
        {
            Orszagnev = orszagnev;
            Terulet = terulet;
            Nepesseg = nepesseg;
            Fovaros = fovaros;
            FovarosNepesseg = fovarosNepesseg * 1000;
        }

        
    }

}
