コード例 #1
0
        static private SelectieLijst ImportCSV(string s)
        {
            SelectieLijst lijst = new SelectieLijst();

            using (var fs = File.OpenRead(s))
                using (var reader = new StreamReader(fs, Encoding.Default, true))
                {
                    while (!reader.EndOfStream)
                    {
                        var          line = reader.ReadLine();
                        var          rij  = line.Split(';');
                        SelectiePunt punt = new SelectiePunt();
                        if (punt.CSVImport(rij) == true)
                        {
                            lijst.Add(punt);
                        }
                        else
                        {
                            return(null);
                        }
                    }
                }
            return(lijst);
        }
コード例 #2
0
 public bool Add(SelectiePunt nieuwpunt)
 {
     Selectiepunten.Add(nieuwpunt);
     return(true);
 }