Esempio n. 1
0
 private void LoadList(List <Distance> list, DistanceStringList saved)
 {
     foreach (string s in saved)
     {
         Distance d = new Distance();
         d.LoadFromString(s);
         list.Add(d);
     }
 }
Esempio n. 2
0
        // ZZZ - Way to use generic IPersistable type in the Persistence class?
        private DistanceStringList SaveList(List <Distance> list)
        {
            if (list == null)
            {
                return(new DistanceStringList());
            }
            DistanceStringList result = new DistanceStringList();

            foreach (Distance d in list)
            {
                result.Add(d.SaveToString());
            }
            return(result);
        }