public void SaveDownloadList() { var storageContainer = StorageManager.RequiredCurrentStorageContainer; using (var stream = storageContainer.CreateFile(downloadListPath)) { var definition = new DownloadListDefinition(); if (downloadInfoCollection.Count != 0) { definition.Entries = new DownloadDefinition[downloadInfoCollection.Count]; for (int i = 0; i < downloadInfoCollection.Count; i++) { var downloadInfo = downloadInfoCollection[i]; definition.Entries[i] = new DownloadDefinition { Uri = downloadInfo.Uri, LastModified = downloadInfo.LastModified }; } } downloadListSerializer.Serialize(stream, definition); } }