Re: how to make array of arrays?
From: Steve (anonymous_at_discussions.microsoft.com)
Date: 09/27/04
- Next message: Jay B. Harlow [MVP - Outlook]: "Re: how to make array of arrays?"
- Previous message: One Handed Man \( OHM - Terry Burns \): "Re: App>> sql"
- In reply to: Jay B. Harlow [MVP - Outlook]: "Re: how to make array of arrays?"
- Next in thread: Jay B. Harlow [MVP - Outlook]: "Re: how to make array of arrays?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 27 Sep 2004 09:28:20 -0700
Yes! Thank you very much. I just figured that out before
I got to the post. You concur!
Thanks for your reply.
Steve
>-----Original Message-----
>Steve,
>> Public arrABC() As ABC = {arrABC1(1), arrABC2(1)}'--ok
>No! you defined an array of ABC, not an array of array of
ABC. arrABC has
>ABC1 & ABC3 in it.
>
>Try:
>
> Public arrABC()() As ABC = {arrABC1, arrABC2}
>
>Then will work:
> Dim a As ABC = arrABC(0)(0)
>
>Hope this helps
>Jay
>
>"Steve" <anonymous@discussions.microsoft.com> wrote in
message
>news:45e801c4a4a8$f8895fb0$a601280a@phx.gbl...
>> 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
>> Public ABC3 As New ABC, ABC4 As New ABC
>> Public arrABC1() As ABC = {ABC1, ABC2}'--this array OK
>> Public arrABC2() As ABC = {ABC3, ABC4}'--this array OK
>>
>> Now I want to place arrABC1 and arrABC2 into an array.
>> How to do this? I tried
>>
>> Public arrABC() As ABC = {arrABC1(1), arrABC2(1)}'--ok
>>
>> and call it like this
>>
>> ...arrABC(0)(0) to access structure ABC1 -- Not OK here
>>
>> but I get an error message that I can't do this because
>> Structure ABC has no default property (option strict
on -
>> must remain on). I could either add a default property
to
>> the structure (how do you do that?) or I could use a
>> different kind of array type object. I have tried
>> ArrayList, but that did not work. I tried an Object()
>> array, but that did not work. Any suggestions
appreciated.
>>
>> Thanks,
>> Steve
>
>
>.
>
- Next message: Jay B. Harlow [MVP - Outlook]: "Re: how to make array of arrays?"
- Previous message: One Handed Man \( OHM - Terry Burns \): "Re: App>> sql"
- In reply to: Jay B. Harlow [MVP - Outlook]: "Re: how to make array of arrays?"
- Next in thread: Jay B. Harlow [MVP - Outlook]: "Re: how to make array of arrays?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|