Beispiel #1
0
 public void Add(GPXFile file)
 {
     if (file == null)
     {
         throw new ArgumentNullException("Error: The argument is Null");
     }
     GPXFileCollection.Add(file);
 }
Beispiel #2
0
        public void Delete(string fileName)
        {
            if (fileName == null)
            {
                throw new Exception("File name cannot be null");
            }

            int index = 0;

            while (index < GPXFileCollection.Count)
            {
                if (GPXFileCollection[index].FileName == fileName)
                {
                    GPXFileCollection.RemoveAt(index);
                    break;
                }
                index++;
            }
        }