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

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

OrderedDictionary.IsReadOnly プロパティ

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

OrderedDictionary コレクション読み取り専用かどうかを示す値を取得します

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

Dim instance As OrderedDictionary
Dim value As Boolean

value = instance.IsReadOnly
public bool IsReadOnly { get;
 }
/** @property */
public final boolean get_IsReadOnly ()

プロパティ
OrderedDictionary コレクション読み取り専用場合trueそれ以外場合false既定値false です。

解説解説
使用例使用例

OrderedDictionary コレクション変更方法を示すコード例次に示します。この例では、IsReadOnly プロパティ使用してOrderedDictionary変更できるかどうか確認します。このコードは、OrderedDictionary参照できるコード例一部です。

' Modifying the OrderedDictionary
If Not myOrderedDictionary.IsReadOnly Then

    ' Insert a new key to the beginning of the OrderedDictionary
    myOrderedDictionary.Insert(0, "insertedKey1",
 "insertedValue1")

    ' Modify the value of the entry with the key "testKey2"
    myOrderedDictionary("testKey2") = "modifiedValue"

    ' Remove the last entry from the OrderedDictionary: "testKey3"
    myOrderedDictionary.RemoveAt(myOrderedDictionary.Count - 1)

    ' Remove the "keyToDelete" entry, if it exists
    If (myOrderedDictionary.Contains("keyToDelete"))
 Then
        myOrderedDictionary.Remove("keyToDelete")
    End If
End If
// Modifying the OrderedDictionary
if (!myOrderedDictionary.IsReadOnly)
{
    // Insert a new key to the beginning of the OrderedDictionary
    myOrderedDictionary.Insert(0, "insertedKey1", "insertedValue1");

    // Modify the value of the entry with the key "testKey2"
    myOrderedDictionary["testKey2"] = "modifiedValue";

    // Remove the last entry from the OrderedDictionary: "testKey3"
    myOrderedDictionary.RemoveAt(myOrderedDictionary.Count - 1);

    // Remove the "keyToDelete" entry, if it exists
    if (myOrderedDictionary.Contains("keyToDelete"))
    {
        myOrderedDictionary.Remove("keyToDelete");
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
OrderedDictionary クラス
OrderedDictionary メンバ
System.Collections.Specialized 名前空間


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS