C# StringCollection IsReadOnly
Description
StringCollection IsReadOnly
gets a value indicating
whether the StringCollection is read-only.
Syntax
StringCollection.IsReadOnly
has the following syntax.
public bool IsReadOnly { get; }
Example
using System;/* www . java 2s. c om*/
using System.Collections;
using System.Collections.Specialized;
public class SamplesStringCollection {
public static void Main() {
StringCollection myCol = new StringCollection();
String[] myArr = new String[] { "A", "B", "C", "java2s.com"};
myCol.AddRange( myArr );
Console.WriteLine( myCol.IsReadOnly);
}
}
The code above generates the following result.