[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Is there any possibilty to use an undefined (unlimited) amount

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 6
Thread images: 1

File: 1442809571046.png (2MB, 1920x1080px) Image search: [Google]
1442809571046.png
2MB, 1920x1080px
Is there any possibilty to use an undefined (unlimited) amount of objects for any data type in C#?

Example: you have "Dictionary<int, Tuple<string, string>>". I want the tuple to be able to be able to hold an unlimited (dynamically adjusted) amount of objects. Is this possible with any type in C#?
>>
How much memory does an infinite list occupy?

Theres your answer.
>>
>>55242750
Obviously it is not about an infinite list but rather of having the possibilty to choose between 1 or for example 10 values. To be concrete: I am having an sql database and I do not know how many columns are asked for which means I have to either use an array of which most of the time 9 entries are completely empty, which is not only a really ugly way but also terribly annoying as it fucks up with multiple loops or I have to override it which bloats the code uslessly.

I mean you already have the params argument in C# so why not the other way around?
>>
>>55242750
Well as I get no answer I will have to use an ugly way: I will add a delimiter and split the result. It is terribly ugly but appearently I have no other choice
>>
>>55242797
Why don't you just use a SqlDataReader or some other object designed for reading result sets from a database and just get its number of columns using FieldCount? You can then store the results in a DataTable. This scenario is better handled with a solution designed specifically for database usage.
>>
You want a list of a size that will determined at run-time? Try a list.
Thread posts: 6
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.