Check if the BitArray is read-only in CSharp
Description
The following code shows how to check if the BitArray is read-only.
Example
using System;/*from w ww . ja v a2 s . c om*/
using System.Collections;
public class SamplesBitArray {
public static void Main() {
BitArray myBA = new BitArray( new byte[]{0,0,0,1} );
myBA[0] = true;
Console.WriteLine(myBA.IsReadOnly);
}
}
The code above generates the following result.