CommaDelimitedStringCollection.IsReadOnly プロパティ
定義
コレクション オブジェクトが読み取り専用かどうかを示す値を取得します。Gets a value indicating whether the collection object is read-only.
public:
property bool IsReadOnly { bool get(); };
public bool IsReadOnly { get; }
member this.IsReadOnly : bool
Public ReadOnly Property IsReadOnly As Boolean
プロパティ値
CommaDelimitedStringCollection 内の指定された文字列要素が読み取り専用の場合は true
。それ以外の場合は false
。true
if the specified string element in the CommaDelimitedStringCollection is read-only; otherwise, false
.
例
次のコード例は、プロパティの使用方法を示して IsReadOnly います。The following code example demonstrates how to use the IsReadOnly property. このコード例は、クラスの概要に用意されている大規模な例の一部です CommaDelimitedStringCollection 。This code example is part of a larger example provided for the CommaDelimitedStringCollection class overview.
// Call IsReadyOnly.
Console.WriteLine("IsReadOnly: {0}",
myStrCollection.IsReadOnly);
' Call IsReadyOnly.
Console.WriteLine("IsReadOnly: {0}", _
myStrCollection.IsReadOnly)
注釈
true
コレクションが読み取り専用としてマークされている場合、このプロパティはを返します。This property returns true
if the collection is marked as read-only. これは、デザイン時ではなく、実行時に要素を保護する場合に便利です。This is useful for protecting the element at run time, as opposed to design time. 詳細については、クラスのメソッドを参照してください IsReadOnly System.Configuration.ConfigurationElement 。For more information, see the IsReadOnly method on the System.Configuration.ConfigurationElement class.