Solved

Arrays of BitArrays in  C#

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Service to Receive TCP Packets 4 123
Data Saving 5 56
Connecting database in Xamarin? 6 52
Class object 2 27
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
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.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

896 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now