ASP Keyプロパティ
Dictionary オブジェクトの完全なリファレンス
Key プロパティは、Dictionary オブジェクト内の既存のキーに新しい値を設定します。
構文
DictionaryObject.Key(key)=newkey
| パラメータ | 説明 |
|---|---|
| key | 必須です。変更するキーの名前。 |
| newkey | 必須です。キーの新しい名前。 |
例
<%
Dim d
Set d=Server.CreateObject("Scripting.Dictionary")
d.Add "re","Red"
d.Add "gr","Green"
d.Add "bl","Blue"
d.Add "pi","Pink"
d.Key("re")="r"
Response.Write("The value of key r is: " & d.Item("r"))
%>
出力:
The value of key r is: Red
Dim d
Set d=Server.CreateObject("Scripting.Dictionary")
d.Add "re","Red"
d.Add "gr","Green"
d.Add "bl","Blue"
d.Add "pi","Pink"
d.Key("re")="r"
Response.Write("The value of key r is: " & d.Item("r"))
%>
出力:
The value of key r is: Red
Dictionary オブジェクトの完全なリファレンス その他の拡張機能