473,387 Members | 3,820 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,387 software developers and data experts.

Is there a upper bound limitation on ArrayList in C#?

Hi:

I need make a calculation from database and the result may have 20,000,000
records which format is just a string. Can I add them into an ArrayList
object one by one? Is there any upper limitation on ArrayList object?

Even there is no limit, I don't think this is not a good solution. It must
take much memory. Any suggestion?

Thanks

Q.
Nov 16 '05 #1
4 3065
Well, you're limited only by memory, but that's quite a few strings. It
would take a long time to read all that into memory and would probably
consume all your memory and a lot of swap space.

You don't describe the calculation you need to make. If you describe what it
is you're trying to do as well as tell us what kind of database it is
(Access, SQL Server, etc), we can probably provide a better solution.

Pete

"Quentin Huo" <q.***@manyworlds.com> wrote in message
news:uZ**************@TK2MSFTNGP12.phx.gbl...
Hi:

I need make a calculation from database and the result may have 20,000,000
records which format is just a string. Can I add them into an ArrayList
object one by one? Is there any upper limitation on ArrayList object?

Even there is no limit, I don't think this is not a good solution. It must
take much memory. Any suggestion?

Thanks

Q.

Nov 16 '05 #2
Why not do the calculation in the query?
bobc
"Quentin Huo" <q.***@manyworlds.com> wrote in message
news:uZ**************@TK2MSFTNGP12.phx.gbl...
Hi:

I need make a calculation from database and the result may have 20,000,000
records which format is just a string. Can I add them into an ArrayList
object one by one? Is there any upper limitation on ArrayList object?

Even there is no limit, I don't think this is not a good solution. It must
take much memory. Any suggestion?

Thanks

Q.

Nov 16 '05 #3
The hard limit would appear to be Int.MaxValue as int is used for things
like count and the indexer.

--
William Stacey, MVP
http://mvp.support.microsoft.com

"Quentin Huo" <q.***@manyworlds.com> wrote in message
news:uZ**************@TK2MSFTNGP12.phx.gbl...
Hi:

I need make a calculation from database and the result may have 20,000,000
records which format is just a string. Can I add them into an ArrayList
object one by one? Is there any upper limitation on ArrayList object?

Even there is no limit, I don't think this is not a good solution. It must
take much memory. Any suggestion?

Thanks

Q.


Nov 16 '05 #4
Quentin,

I would only ask meself those questions when my reference would exceed an
integer conform the used processor. I assume that that is the address width
that forever is used in Net classes.

However, when you have calculated the values, from an extraction from your
database, why don't you than not just calculate them everytime new?

Cor
Nov 16 '05 #5

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

Similar topics

3
by: CajunCoiler \(http://www.cajuncoiler.tk\) | last post by:
I've seen no reference to this in the MSDN library, so I ask here... what is the known upper limit for the RichTextbox control? And when this limit is exceeded, what error is generated?
1
by: Jax | last post by:
I have an arraylist of objects. This arraylist is bound to a repeater. That repeater then creates a set of controls like so <asp:repeater id="garmentRepeater" runat="server"...
3
by: Matthew Woods | last post by:
Hi, is there any way to format and order the columns displayed in a datagrid bound to a class that inherits from IBindingList? i have used DataGridTableStyle and added DataGridTextBoxColumns to it...
3
by: phlian | last post by:
I've got a dropdownlist (webform) bound to an arraylist which holds my several of a custom object as follows: fldOption.DataSource = prod.Items fldOption.DataTextField = "Options"...
0
by: Dave | last post by:
Hi all, I have a listbox that is complex bound by an arraylist. The problem is that when I delete an object from the arraylist, the listbox does not reflect those changes. I tried refreshing...
0
by: Marcus Kwok | last post by:
I am having a weird problem with my DataGrid that is bound to an ArrayList. My situation is as follows: I have two DataGrids on a modal form. The top grid populates an ArrayList from a file,...
1
by: g.o.atkins | last post by:
Hi, I've bound an ArrayList to a datagrid and succesfully managed to display the data via an ItemTemplate column and using <%# Container.DataItem %>. The problem I have however is trying to...
3
by: Jerry West | last post by:
I'd like to get the upper bound index of an integer array. I've tried the following: Dim i as Integer Dim arrayIng() as Integer i = arrayIng.GetUpperBound This doesn't work. It seems...
2
by: Vic | last post by:
I have a ArrayList bound to a DataGridView. The objects in de arryalist have 5 propertie but i need only 3 of then in de datagridview. Cane somebody tell me how to prevent that some of the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.