generate an array with different data types?

  • Thread starter Thread starter Schnogge
  • Start date Start date
S

Schnogge

Hi!

it is possible to generate an multiple-dimensional array
with different data types? Or is it possible to combine
a one-dimensional array with an other which has an other
data type?

How must i do that?

Thank you so much !
Schnogge
 
it is possible to generate an multiple-dimensional array
with different data types? Or is it possible to combine
a one-dimensional array with an other which has an other
data type?

How must i do that?

remember that any type can be promoted to 'object'. so, create an array to
store objects as if they were of the type 'object'.

object[] myArray;

you can then put anything into such table.

Regards,
Wiktor
 
I think it is a good suggestion, but it didn´t resolve the
problem.
Maybe i have to discribe it better.

I´ve got a IList with a self defined datatype. each
element of this list will be checked an added to a list
with members of the same destiny or added to another list.

example: IList with a lot of objects
every object has an int-value

now i want to sort the objects in a list
decided by the int value
if the int-value didn´t exists, a new list must
be generated.

i hope that a better description of the problem.

thanks so far.
schnogge


-----Original Message-----
Maybe what you need is an array of structures?

struct Person {
String name;
int age;
}

Person[] students;

Regards - Octavio

Schnogge said:
Hi!

it is possible to generate an multiple-dimensional array
with different data types? Or is it possible to combine
a one-dimensional array with an other which has an other
data type?

How must i do that?

Thank you so much !
Schnogge


.
 
Back
Top