Solved

Arrays of BitArrays in  C#

Posted on 2008-10-02
2
773 Views
Last Modified: 2012-08-13
How do I create an array (8x8) of BitArrays (16 bits). In otherwords an 8x8  chessboard eatch with its own BitArray of 16 bits.      

  BitArray bitArray = new BitArray(16);
   int [,] [] board = new int [8,8] [];
0
Comment
Question by:lplayer
2 Comments
 
LVL 18

Accepted Solution

by:
philipjonathan earned 500 total points
ID: 22624136
BitArray[,] board = new BitArray[8, 8];
for (int i = 0; i < 8; i++)
{
  for (int j = 0; j < 8; j++)
  {
    board[i, j] = new BitArray(16);
  }
}

// To access BitArray at (i, j) call board[i, j]
0
 
LVL 1

Author Closing Comment

by:lplayer
ID: 31502360
Thanks foe ultra fast response.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question