Solved

Arrays of BitArrays in  C#

Posted on 2008-10-02
2
763 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

786 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