DownloadOperation.IsRandomAccessRequired 屬性

定義

布林值屬性,可啟用隨機存取。 在 DownloadOperation 物件上呼叫 StartAsync () 之前,屬性必須設定為 TRUE,才能使用隨機存取功能。 呼叫 StartAsync () 之後,請呼叫 GetResultRandomAccessStreamReference 以取得隨機存取資料流程的參考,並從中讀取。

public:
 property bool IsRandomAccessRequired { bool get(); void set(bool value); };
bool IsRandomAccessRequired();

void IsRandomAccessRequired(bool value);
public bool IsRandomAccessRequired { get; set; }
var boolean = downloadOperation.isRandomAccessRequired;
downloadOperation.isRandomAccessRequired = boolean;
Public Property IsRandomAccessRequired As Boolean

屬性值

Boolean

bool

TRUE 表示使用隨機存取功能。 預設值為 FALSE。

Windows 需求

裝置系列
Windows 10 Fall Creators Update (已於 10.0.16299.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v5.0 引進)

備註

IsRandomAccessRequired setter 將會失敗,並出現E_ILLEGAL_METHOD_CALL,而且如果 DownloadOperation上已呼叫 StartAsync () ,則為自訂錯誤訊息。

適用於

另請參閱