The GetBasicPropertiesAsync method is a part of the StorageFile class in the Windows.Storage namespace of C#. This method retrieves a BasicProperties object that contains basic properties of the current file, such as the size and date/time information.
Example:
// Load the file. StorageFile file = await StorageFile.GetFileFromPathAsync("C:\myfile.txt");
// Get the basic properties of the file. BasicProperties basicProperties = await file.GetBasicPropertiesAsync();
// Get the file size and date/time information. ulong fileSize = basicProperties.Size; DateTimeOffset dateModified = basicProperties.DateModified;
In this example, we first load a file from a path, then use the GetBasicPropertiesAsync method to retrieve the basic properties of the file. We then use the BasicProperties object to get the size and date/time information of the file.
Package library: Windows.winmd.
C# (CSharp) Windows.Storage StorageFile.GetBasicPropertiesAsync - 28 examples found. These are the top rated real world C# (CSharp) examples of Windows.Storage.StorageFile.GetBasicPropertiesAsync extracted from open source projects. You can rate examples to help us improve the quality of examples.