Solved

Arrays of BitArrays in  C#

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

706 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

12 Experts available now in Live!

Get 1:1 Help Now