PropertyCollection.System.Collections.IDictionary.Keys プロパティとは? わかりやすく解説

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

PropertyCollection.System.Collections.IDictionary.Keys プロパティ

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

IDictionary オブジェクトキー保持している ICollection オブジェクト取得します

名前空間: System.DirectoryServices
アセンブリ: System.DirectoryServices (system.directoryservices.dll 内)
構文構文

Private ReadOnly Property
 System.Collections.IDictionary.Keys As ICollection Implements
 IDictionary.Keys
Dim instance As PropertyCollection
Dim value As ICollection

value = CType(instance, IDictionary).Keys
ICollection IDictionary.Keys { get; }
private:
virtual property ICollection^ System.Collections.IDictionary.Keys {
    ICollection^ get () sealed = IDictionary::Keys::get;
}

プロパティ
IDictionary オブジェクトキー保持している ICollection オブジェクト

解説解説

返されICollection オブジェクト内のキー順序指定されていませんが、Values プロパティから返されICollection 内の対応する値と必ず同じ順序なります

使用例使用例

Keys プロパティ実装する方法の例を次に示します。このコード例は、IDictionary クラストピック取り上げているコード例一部です。

Public ReadOnly Property
 Keys() As ICollection Implements IDictionary.Keys
    Get

        ' Return an array where each item is a key.
        Dim keyArray() As Object
 = New Object(ItemsInUse - 1) {}
        Dim n As Integer
        For n = 0 To ItemsInUse - 1
            keyArray(n) = items(n).Key
        Next n

        Return keyArray
    End Get
End Property
public ICollection Keys
{
    get
    {
        // Return an array where each item is a key.
        Object[] keys = new Object[ItemsInUse];
        for (Int32 n = 0; n < ItemsInUse; n++)
            keys[n] = items[n].Key;
        return keys;
    }
}
public:
    virtual property ICollection^ Keys
    {
        ICollection^ get()
        {
            // Return an array where each item is a key.
            array<Object^>^ keys = gcnew array<Object^>(itemsInUse);
            for (int i = 0; i < itemsInUse;
 i++)
            {
                keys[i] = items[i]->Key;
            }
            return keys;
        }
    }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PropertyCollection クラス
PropertyCollection メンバ
System.DirectoryServices 名前空間
ICollection


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

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

辞書ショートカット

すべての辞書の索引

PropertyCollection.System.Collections.IDictionary.Keys プロパティのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS