Share via


PersonalizationStateQuery.Item[String] 屬性

定義

取得或設定查詢參數的值。

public:
 property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ queryKey); void set(System::String ^ queryKey, System::Object ^ value); };
public object this[string queryKey] { get; set; }
member this.Item(string) : obj with get, set
Default Public Property Item(queryKey As String) As Object

參數

queryKey
String

區分大小寫的查詢字串。 該值應當為下列其中一個:"PathToMatch"、"UserInactiveSinceDate" 或 "UsernameToMatch"。

屬性值

Object

queryKey 參數表示的查詢參數值。

例外狀況

queryKeynull

queryKey 為空字串 ("")。

-或- 修剪後,queryKey 會為空字串。

-或- 提供給 PersonalizationStateQuery 三個屬性其中一個的值型別不正確。

備註

這個屬性是類別的預設索引子 PersonalizationStateQuery 。 它會傳回所指定的查詢參數值 queryKey 。 您可以使用 PersonalizationStateQuery.this["UsernameToMatch"]PersonalizationStateQuery.this["PathToMatch"]PersonalizationStateQuery.this["UserInactiveSinceDate"] UsernameToMatch 分別設定、和 PathToMatch UserInactiveSinceDate 屬性。 當索引子中設定這三個屬性時,會針對適當的類型進行驗證。

如果不存在,則這個屬性 null queryKey 會傳回。

適用於