Skip to content

Commit acc7f48

Browse files
committed
chore: move format provider inline
Signed-off-by: HEIGE-PCloud <heige.pcloud@outlook.com>
1 parent b1a4569 commit acc7f48

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Microsoft.Toolkit.Uwp.SampleApp/Data/DataGridDataSource.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public async Task<IEnumerable<DataGridDataItem>> GetDataAsync()
3131
StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(uri);
3232
IRandomAccessStreamWithContentType randomStream = await file.OpenReadAsync();
3333
_items = new ObservableCollection<DataGridDataItem>();
34-
IFormatProvider provider = CultureInfo.InvariantCulture.DateTimeFormat;
3534

3635
using (StreamReader sr = new StreamReader(randomStream.AsStreamForRead()))
3736
{
@@ -50,7 +49,7 @@ public async Task<IEnumerable<DataGridDataItem>> GetDataAsync()
5049
Coordinates = values[4],
5150
Prominence = uint.Parse(values[5]),
5251
Parent_mountain = values[6],
53-
First_ascent = DateTimeOffset.Parse(values[7], provider),
52+
First_ascent = DateTimeOffset.Parse(values[7], CultureInfo.InvariantCulture.DateTimeFormat),
5453
Ascents = values[8],
5554
});
5655
}

0 commit comments

Comments
 (0)