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.





















Home »
  C# Tutorial »
    Collections »




ArrayList
BitArray
Collection
Comparer
HashSet
Hashtable
LinkedList
List
ListDictionary
OrderedDictionary
Queue
SortedList
SortedSet
Stack
StringCollection
StringDictionary