C# BitArray IsReadOnly

Description

BitArray IsReadOnly gets a value indicating whether the BitArray is read-only.

Syntax

BitArray.IsReadOnly has the following syntax.


public bool IsReadOnly { get; }

Example


using System;/*  w  w w.j av a 2  s  .c  o  m*/
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 »
    System.Collections »




ArrayList
BitArray
Comparer
Hashtable
Queue
SortedList
Stack