Click here to Skip to main content
15,918,108 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: my assignment Pin
Colin Angus Mackay4-May-04 22:13
Colin Angus Mackay4-May-04 22:13 
GeneralRe: my assignment Pin
Colin Angus Mackay4-May-04 22:17
Colin Angus Mackay4-May-04 22:17 
GeneralActiveDocument Creation Date Pin
skoizumi291104-May-04 11:15
sussskoizumi291104-May-04 11:15 
GeneralCrystal Example Pin
Andreas L4-May-04 6:06
Andreas L4-May-04 6:06 
GeneralRe: Crystal Example Pin
Member 9923937-May-04 11:39
Member 9923937-May-04 11:39 
Generalcritical section Pin
Anonymous4-May-04 3:40
Anonymous4-May-04 3:40 
QuestionCan't cast ArrayList to Array? Pin
FruitBatInShades4-May-04 2:05
FruitBatInShades4-May-04 2:05 
AnswerRe: Can't cast ArrayList to Array? Pin
Dave Kreskowiak4-May-04 4:41
mveDave Kreskowiak4-May-04 4:41 
This is because IDList.ToArray() is returning an Array object and not an Object(). You might want to remove the GetType(Int32) and try it. But I think it's still going to fail. The problem your running into is an ArrayList is a general type collection, not an Object(). It can hold any type of data without being cast to a specific type first. You can create an ArrayList without any parameters and just start adding Strings to it and it won't complain. Same is true for Integers...if you just create the ArrayList and start adding numbers to it, chances are that ArrayList is a collection of Integers and not Int32s. This is were your casting problem is coming from. Your trying to do two cast's, an Integer to an Int32, and an Array to an Object(), under the Strict rules.

You either have to use the ArrayList as is, or use an Object() array instead of an ArrayList (consistancy of object types is key!), or get rid of the Option Strict.

Personally, I never use Option Strict...


RageInTheMachine9532
Generalcapture packet and manipulate fields Pin
babur khan3-May-04 23:31
babur khan3-May-04 23:31 
GeneralRe: capture packet and manipulate fields Pin
Colin Angus Mackay4-May-04 0:33
Colin Angus Mackay4-May-04 0:33 
GeneralRe: capture packet and manipulate fields Pin
babur khan4-May-04 5:25
babur khan4-May-04 5:25 
GeneralRe: capture packet and manipulate fields Pin
Colin Angus Mackay4-May-04 6:21
Colin Angus Mackay4-May-04 6:21 
GeneralRe: capture packet and manipulate fields Pin
Dave Kreskowiak4-May-04 9:18
mveDave Kreskowiak4-May-04 9:18 
GeneralRe: capture packet and manipulate fields Pin
Colin Angus Mackay4-May-04 9:29
Colin Angus Mackay4-May-04 9:29 
GeneralRe: capture packet and manipulate fields Pin
babur khan4-May-04 23:03
babur khan4-May-04 23:03 
GeneralRe: capture packet and manipulate fields Pin
Colin Angus Mackay4-May-04 23:32
Colin Angus Mackay4-May-04 23:32 
GeneralRe: capture packet and manipulate fields Pin
Dave Kreskowiak4-May-04 4:24
mveDave Kreskowiak4-May-04 4:24 
GeneralRe: capture packet and manipulate fields Pin
Colin Angus Mackay4-May-04 4:33
Colin Angus Mackay4-May-04 4:33 
GeneralRe: capture packet and manipulate fields Pin
Dave Kreskowiak4-May-04 4:42
mveDave Kreskowiak4-May-04 4:42 
GeneralComboBox doesn't show last item added (but does when I use debugger) Pin
Rikard Skarp3-May-04 22:34
sussRikard Skarp3-May-04 22:34 
Questionis it a modifier problem? Pin
3hrguy3-May-04 22:26
3hrguy3-May-04 22:26 
AnswerRe: is it a modifier problem? Pin
Dave Kreskowiak4-May-04 4:15
mveDave Kreskowiak4-May-04 4:15 
GeneralRe: is it a modifier problem? Pin
3hrguy4-May-04 14:54
3hrguy4-May-04 14:54 
GeneralCustom Columheader Pin
Ole1233-May-04 14:48
Ole1233-May-04 14:48 
GeneralRe: Custom Columheader Pin
superwinsock3-May-04 22:36
superwinsock3-May-04 22:36 

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.