KeyValuePair.Key プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > KeyValuePair.Key プロパティの意味・解説 

KeyValuePair.Key プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

キー/値ペア内のキー取得します

名前空間: System.Collections.Generic
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Dim instance As KeyValuePair(Of
 TKey, TValue)
Dim value As TKey

value = instance.Key
public TKey Key { get; }
public:
property TKey Key {
    TKey get ();
}
/** @property */
public TKey get_Key ()

プロパティ
KeyValuePair 内のキーを表す TKey

解説解説
使用例使用例

KeyValuePair メソッド使用してディクショナリのキーと値を列挙する方法次のコード例示します

このコードは、Dictionary クラストピック取り上げているコード例一部分です。

' When you use foreach to enumerate dictionary elements,
' the elements are retrieved as KeyValuePair objects.
Console.WriteLine()
For Each kvp As KeyValuePair(Of
 String, String) In openWith
    Console.WriteLine("Key = {0}, Value = {1}", _
        kvp.Key, kvp.Value)
Next kvp
// When you use foreach to enumerate dictionary elements,
// the elements are retrieved as KeyValuePair objects.
Console.WriteLine();
foreach( KeyValuePair<string, string>
 kvp in openWith )
{
    Console.WriteLine("Key = {0}, Value = {1}", 
        kvp.Key, kvp.Value);
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
KeyValuePair ジェネリック構造体
KeyValuePair メンバ
System.Collections.Generic 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からKeyValuePair.Key プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からKeyValuePair.Key プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からKeyValuePair.Key プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

KeyValuePair.Key プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



KeyValuePair.Key プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS