Click here to Skip to main content
15,913,610 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: DateTimePicker Pin
Joshua Quick18-Jan-06 16:48
Joshua Quick18-Jan-06 16:48 
QuestionCan't see the horizontal scrollbar in listbox VB6 Pin
Joy Anne18-Jan-06 13:55
Joy Anne18-Jan-06 13:55 
AnswerRe: Can't see the horizontal scrollbar in listbox VB6 Pin
Joshua Quick18-Jan-06 16:00
Joshua Quick18-Jan-06 16:00 
GeneralRe: Can't see the horizontal scrollbar in listbox VB6 Pin
Joy Anne18-Jan-06 17:06
Joy Anne18-Jan-06 17:06 
GeneralRe: Can't see the horizontal scrollbar in listbox VB6 Pin
Joshua Quick18-Jan-06 17:21
Joshua Quick18-Jan-06 17:21 
QuestionControl a Scanner with VB.net Pin
GerhardKreuzer18-Jan-06 12:51
GerhardKreuzer18-Jan-06 12:51 
Questionhow to transfer sql table to access via module code.Please help!! Pin
marclenoir200518-Jan-06 5:20
marclenoir200518-Jan-06 5:20 
QuestionGetting the value of an item in a nested array Pin
jszpila18-Jan-06 5:04
jszpila18-Jan-06 5:04 
Hello everyone,
I have two arraylists, let's call them ParentArrayList and ChildArrayList. I'm converting them into arrays, but I'm having a hard time getting the values out of the ChildArrayList. I'm pretty new to VB.Net (especially how it works with arrays), so hopefully you can help me find what I'm doing wrong with my code.

Here's where I'm adding an element to the ParentArrayList:
        For i = 1 To intLimit<br />
            ParentArrayList.Add(MakeChild(i))<br />
        Next<br />
<br />
        ParentArrayList.ToArray()<br />
        Response.Write(ParentArrayList(1))

Note: the response.write returns "System.Object[]", so I know casting is probably an issue but I'm not sure exactly sure how to do that besides how I'm doing it in the following:

 Function MakeChild(ByVal SomeNumber as Integer)<br />
'cut out some SQL stuff here<br />
<br />
While DataReaderResult.Read() = True<br />
            For i = 0 To 4<br />
                ChildArray.Add(DataReaderResult(i))<br />
            Next<br />
        End While<br />
        drRes.Close()<br />
<br />
        Return ChildArray.ToArray


It may be that I'm using ToArray improperly as I have yet to find a good explanation on its usage. Plus after all that's taken care of I still need to know how to get the information out of an element in Child array.

Any ideas? Thanks in advance for your help!

EDIT: ChildArray.ToArray(Type.GetType("System.String")) now returns System.String[] so I've gotten that far. Now I just need to figure out how to get values out from referencing the ChildArray via the ParentArray (ie something along the lines of Response.Write(ParentArray(1, ChildArray(4))) )

-------------------
abort, retry, fail?

-- modified at 12:13 Wednesday 18th January, 2006
AnswerRe: Getting the value of an item in a nested array Pin
Guffa18-Jan-06 14:16
Guffa18-Jan-06 14:16 
GeneralRe: Getting the value of an item in a nested array Pin
jszpila19-Jan-06 3:43
jszpila19-Jan-06 3:43 
Questionadding details in a ListView Pin
Devraj Raut18-Jan-06 4:19
Devraj Raut18-Jan-06 4:19 
AnswerRe: adding details in a ListView Pin
Dave Kreskowiak18-Jan-06 4:56
mveDave Kreskowiak18-Jan-06 4:56 
AnswerRe: adding details in a ListView Pin
hmklakmal18-Jan-06 5:02
hmklakmal18-Jan-06 5:02 
QuestionInvalid printer specified Pin
misecprj18-Jan-06 4:19
misecprj18-Jan-06 4:19 
AnswerRe: Invalid printer specified Pin
Dave Kreskowiak18-Jan-06 4:43
mveDave Kreskowiak18-Jan-06 4:43 
QuestionIcon problem Pin
Brightday18-Jan-06 4:12
Brightday18-Jan-06 4:12 
AnswerRe: Icon problem Pin
Dave Kreskowiak18-Jan-06 4:40
mveDave Kreskowiak18-Jan-06 4:40 
QuestionRe: Icon problem Pin
Brightday19-Jan-06 5:22
Brightday19-Jan-06 5:22 
AnswerRe: Icon problem Pin
Dave Kreskowiak19-Jan-06 9:28
mveDave Kreskowiak19-Jan-06 9:28 
QuestionRe: Icon problem Pin
Brightday19-Jan-06 15:04
Brightday19-Jan-06 15:04 
AnswerRe: Icon problem Pin
Dave Kreskowiak19-Jan-06 17:31
mveDave Kreskowiak19-Jan-06 17:31 
GeneralRe: Icon problem Pin
Brightday20-Jan-06 10:43
Brightday20-Jan-06 10:43 
AnswerRe: Icon problem Pin
Joshua Quick18-Jan-06 7:25
Joshua Quick18-Jan-06 7:25 
GeneralRe: Icon problem Pin
Brightday19-Jan-06 5:13
Brightday19-Jan-06 5:13 
GeneralRe: Icon problem Pin
Joshua Quick19-Jan-06 7:38
Joshua Quick19-Jan-06 7:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.