【问题标题】:UWP. How to find out size of uwp-c# Windows.Storage element?UWP。如何找出 uwp-c# Windows.Storage 元素的大小?
【发布时间】:2016-08-27 18:21:44
【问题描述】:

如果文件列表,如何找出“文件”或每个元素(foreach(文件中的var文件))的大小?可能相当大。 WPF 的序列化在 UWP 中不起作用。

  var openPicker = new FileOpenPicker();
      openPicker.FileTypeFilter.Add("*");

      var files = await openPicker.PickMultipleFilesAsync();

【问题讨论】:

    标签: c# windows size uwp storage


    【解决方案1】:
    foreach (var file in files)
    {
        var fileProperties = await file.GetBasicPropertiesAsync();
        var size = fileProperties.Size;
    }
    

    【讨论】:

      猜你喜欢
      • 2017-09-08
      • 1970-01-01
      • 1970-01-01
      • 2018-01-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-04
      • 1970-01-01
      相关资源
      最近更新 更多