public DownloadExerciseData DeepCopy(DownloadExerciseData data) { DownloadExerciseData newData = new DownloadExerciseData(); newData.Name = data.Name; newData.Description = data.Description; newData.Type = data.Type; newData.BodyPart = data.BodyPart; newData.DateCreated = data.DateCreated; newData.Featured = data.Featured; newData.FileName = data.FileName; return(newData); }
public void RemoveAt(int Index) { if (DownloadExercise.Length > 0) { DownloadExerciseData[] tempArray = new DownloadExerciseData[DownloadExercise.Length - 1]; for (int i = 0; i < Index; i++) { tempArray[i] = DownloadExercise[i]; } for (int i = Index + 1; i < DownloadExercise.Length; i++) { tempArray[i - 1] = DownloadExercise[i]; } DownloadExercise = tempArray; } }
public void Add(DownloadExerciseData newItem) { DownloadExerciseData[] tempArray = new DownloadExerciseData[DownloadExercise.Length + 1]; if (DownloadExercise.Length > 0) { for (int i = 0; i < DownloadExercise.Length; i++) { tempArray[i] = DownloadExercise[i]; } tempArray[tempArray.Length - 1] = newItem; DownloadExercise = tempArray; } else { tempArray[0] = newItem; DownloadExercise = tempArray; } }