KnownFolders.GetFolderForUserAsync(User, KnownFolderId) 方法

定义

用户返回指定已知文件夹的静态方法。

public:
 static IAsyncOperation<StorageFolder ^> ^ GetFolderForUserAsync(User ^ user, KnownFolderId folderId);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<StorageFolder> GetFolderForUserAsync(User const& user, KnownFolderId const& folderId);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<StorageFolder> GetFolderForUserAsync(User user, KnownFolderId folderId);
function getFolderForUserAsync(user, folderId)
Public Shared Function GetFolderForUserAsync (user As User, folderId As KnownFolderId) As IAsyncOperation(Of StorageFolder)

参数

user
User

为其返回文件夹的用户。

folderId
KnownFolderId

要返回的文件夹的 ID。

返回

此方法完成后,它将返回请求的 StorageFolder 对象。

属性

Windows 要求

设备系列
Windows 10 (在 10.0.10586.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v2.0 中引入)

适用于

另请参阅