Hi,
I am a developper who needs to return a collection of different
datatypes. Have considered using an array containing arraylists. Is it
posible? or is there a better way? Would like to use some kind of 2
dim arraylist, like Vectors in JAVA...
Carsten 3 1961
I'm still brand new to .NET, but fabricated ADO Recordsets worked great for
this in VB. I presume ADO.NET Recordsets are at least as useful for this
job in C#.
On 17 Oct 2003 00:21:08 -0700, ta***@mail.dk (madsen) wrote: Hi, I am a developper who needs to return a collection of different datatypes. Have considered using an array containing arraylists. Is it posible? or is there a better way? Would like to use some kind of 2 dim arraylist, like Vectors in JAVA...
Carsten
madsen <ta***@mail.d k> wrote: I am a developper who needs to return a collection of different datatypes. Have considered using an array containing arraylists. Is it posible? or is there a better way? Would like to use some kind of 2 dim arraylist, like Vectors in JAVA...
An ArrayList in .NET is almost exactly like a Vector in Java. If you
could give some sample code in Java, I'd be happy to translate that to
C# for you.
--
Jon Skeet - <sk***@pobox.co m> http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Arrary list can handle different datatypes (it stores objects)
tried using maps ? (name value pairs).. that could help you
"madsen" <ta***@mail.d k> wrote in message
news:a3******** *************** ***@posting.goo gle.com... Hi, I am a developper who needs to return a collection of different datatypes. Have considered using an array containing arraylists. Is it posible? or is there a better way? Would like to use some kind of 2 dim arraylist, like Vectors in JAVA...
Carsten This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: James |
last post by:
I see that variations on this question have appeared before but I'm still completely stumped.
I'm developing an application with a fairly robust graphics component for 3D rendering. I've written all the 3D rendering scripts, but what's really hanging me up is how to I pass information from an one-dimensional arraylist to a two-dimensional array. Here's what I'm trying to do:
1) My program generates an arraylist called "mpoints" of 2D...
|
by: Marco |
last post by:
Hello there,
We're new to C# and have noticed a strange behaviour which we don't
yet understand.
We wrote a COM DLL (in VC++ 6.0) which performs some calculation based
on some double arrays passed as input parameters to the DLL through
the SetParams method defined as follows:
interface ICliquet : IPricable
|
by: Liz - Newbie |
last post by:
Does anyone know how to clear arrays? My C# books talk
about creating arrays or talk about using Clear or
RemoveAt but these methods don't appear to be available
for my array.
I have an array of client objects called aClients
if I try aClients.RemoveAt I get an error
"System.Array" does not contain a definition
for "RemoveAt".
|
by: David Sobey |
last post by:
basic question, confused by the type system of c#:
i'm making a calendar prog, with an array of days, each day being an array
of events. I want something like:
public struct Event
{
string name;
string UID;
}
|
by: Steve |
last post by:
Hello,
I created a structure ABC and an array of type ABC
Public Structure ABC
Dim str1 As String
Dim int1 As Integer
End Structure
Public ABC1 As New ABC, ABC2 As New ABC
| |
by: Florian G. Pflug |
last post by:
Hi
Since sometime yesterday, my postgresql (7.4.5) reports
"ERROR: cannot compare arrays of different element types",
when I analyze a specific table in my database.
Here is the tables definition:
Column | Type | Modifiers
-------------------+------------------------+----------------------------------------------------
self | datagraph."GOLink" | not null default
|
by: Henri Schomäcker |
last post by:
Hi folks,
what I need is a kind of 2D-Array which should, in the end, represent a
typical html-table and which should be sortable by column.
I thought of an implementation, where an vector does not keep
the rows, as usual, but holds the single _columns_ as lists.
In this case, every column could have it's own datatype, just like
database-tables and could be sortable by the list's sort function.
|
by: Newbie19 |
last post by:
I'm just learning java arrays/arraylists and was wondering what are the best books for learning java arrays/arraylists?
I know practice is the best way to learn, but I have a hard time remembering the little items on arrays/arraylists.
Thanks,
Newbie
|
by: =?Utf-8?B?SkI=?= |
last post by:
Hello
List<Tis said to be more powerful than ArrayLists but if you have
something like this:
List<intmylst = new List<>;
myList.Add("Joe");
myList.Add(25);
the list doesn't seem to accept the name "Joe".
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |