Share via


SqlCacheDependencyDatabaseCollection.GetKey(Int32) メソッド

定義

SqlCacheDependencyDatabaseCollection 内の指定したインデックス位置にある要素のキーを返します。

public:
 System::String ^ GetKey(int index);
public string GetKey (int index);
member this.GetKey : int -> string
Public Function GetKey (index As Integer) As String

パラメーター

index
Int32

返すキーのインデックス。

戻り値

指定したインデックス位置にあるキー。

GetKey メソッドを使用するコード例を次に示します。

string thisKey = sqlCdds.GetKey(0).ToString();
Dim thisKey As String = sqlCdds.GetKey(0)

注釈

指定したインデックスに要素が存在しない場合は、null 参照 (Nothing Visual Basic では ) が返されます。

適用対象

こちらもご覧ください