473,394 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

2-dimensional ArrayList

Hello!

Is it possible to use ArrayList as a 2-dimensional list? I want to keep
a bitmap in it, and I would like to access its elements by providing
two parameters (row and column) rather than calculating offset from the
begin. Thanks in advance for any hints.

--
Iwanow

Jul 23 '06 #1
2 1407

"Iwanow" <kp****@wp.plwrote in message
news:11*********************@75g2000cwc.googlegrou ps.com...
Hello!

Is it possible to use ArrayList as a 2-dimensional list? I want to keep
a bitmap in it, and I would like to access its elements by providing
two parameters (row and column) rather than calculating offset from the
begin. Thanks in advance for any hints.

--
Iwanow
AFAIK, no. Feel free to research here:

http://msdn.microsoft.com/library/de...classtopic.asp
Jul 24 '06 #2
"pvdg42" <pv****@newsgroups.nospamwrote
>Is it possible to use ArrayList as a 2-dimensional list? I want to keep
a bitmap in it, and I would like to access its elements by providing
two parameters (row and column) rather than calculating offset from the
begin. Thanks in advance for any hints.
AFAIK, no. Feel free to research here:
Call me an idiot but what's wrong with a wrapper that
simply combines to indices into one (assuming the
OP really wants a 2-dimensional array - I'm not sure
what a 2-dimensional list would be)?

I.e. x[a,b] =y[a+b*dim(0)]

There are several ways to allocate the backing
store for the memory. Depending on the
requirements (specifically do the dimensions
change frequently?) you could also use a
CLR array which can have more than one
dimension, but has constant size for its
lifetime.

Oc, it might be useful to use a packed representation
if the logical element value range doesn't require all
bits of its physical backing store.

It really sounds like the OP wants either a CLR array
( array<X,N>^ where N>1) or a wrapper around a CLR vector
(array<X>^) with a custom indexer.

-hg

-hg

-hg
Jul 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Alex Ting | last post by:
Hi Everybody, I have an issue about deleting an object from an arrayList. I've bounded a datagrid using this code where it will first run through all of the code in loadQuestions() and bind a...
3
by: Stephen | last post by:
I was wondering if someone can help me with an web application design problem. I have a aspx page which builds up an arraylist called addresses and outputs the values in the arraylist items to a...
6
by: gane kol | last post by:
Hi, I have a code that creates a datatable from an arraylist, but i am getting an error in casting in for (int intRow = 0; intRow < alLCPlist.Count; intRow++) { DataRow drow =...
4
by: Peter | last post by:
I run into this situation all the time and I'm wondering what is the most efficient way to handle this issue: I'll be pulling data out of a data source and want to load the data into an array so...
18
by: JohnR | last post by:
From reading the documentation, this should be a relatively easy thing. I have an arraylist of custom class instances which I want to search with an"indexof" where I'm passing an instance if the...
18
by: Sam | last post by:
Hi All I'm planing to write an application which allows users dynamically add their points (say you can add upto 30,000) and then draw xy graph. Should I use an array for my coordinate point...
6
by: fniles | last post by:
I am using VB.NET 2003 and a socket control to receive and sending data to clients. As I receive data in 1 thread, I put it into an arraylist, and then I remove the data from arraylist and send it...
3
by: Christopher H | last post by:
I've been reading about how C# passes ArrayLists as reference and Structs as value, but I still can't get my program to work like I want it to. Simple example: ...
1
by: =?Utf-8?B?SkI=?= | last post by:
Hello My pgm1 (User Interface Level) passes an empty ArrayList to pgm2 (Business Logic Level). pgm2 then calls pgm3 (Data Access Level) to populate the ArrayList. Question1: When pgm2 gets...
0
by: Kate Horan | last post by:
Hi i have created a class called myArrayList with many methods, I'm now trying to run this class but im getting the error (illegal start of expression), could someone please help me out because im...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.