エンコードでエラーが出るときは
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
をGetEncoding(“Shift_JIS”);の前に追加する
FileOpenPicker openPicker = new FileOpenPicker();
openPicker.ViewMode = PickerViewMode.Thumbnail;
openPicker.SuggestedStartLocation = PickerLocationId.Downloads;
openPicker.FileTypeFilter.Add(".csv");
StorageFile file = await openPicker.PickSingleFileAsync();
if (file != null)
{
var buff = await Windows.Storage.FileIO.ReadBufferAsync(file);
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
var enc = System.Text.Encoding.GetEncoding("Shift_JIS");
textBox1.Text = enc.GetString(buff.ToArray());
}