Click here to Skip to main content
16,008,490 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Where is my program spending the majority of time? Pin
Dave Kreskowiak28-May-13 1:45
mveDave Kreskowiak28-May-13 1:45 
AnswerRe: Where is my program spending the majority of time? Pin
Tim Carmichael28-May-13 5:47
Tim Carmichael28-May-13 5:47 
GeneralRe: Where is my program spending the majority of time? Pin
treddie28-May-13 7:57
treddie28-May-13 7:57 
Questionsubcription out of range? how can i fix this problem Pin
Member 1003837621-May-13 15:02
Member 1003837621-May-13 15:02 
AnswerRe: subcription out of range? how can i fix this problem Pin
Dave Kreskowiak21-May-13 16:30
mveDave Kreskowiak21-May-13 16:30 
Questionvb6 vidoes Pin
gunakag2019-May-13 23:22
gunakag2019-May-13 23:22 
AnswerRe: vb6 vidoes Pin
CHill6020-May-13 0:06
mveCHill6020-May-13 0:06 
QuestionVB.net 2010 form positioning Pin
athan_makubex19-May-13 9:04
athan_makubex19-May-13 9:04 
AnswerRe: VB.net 2010 form positioning Pin
Richard MacCutchan19-May-13 9:39
mveRichard MacCutchan19-May-13 9:39 
AnswerRe: VB.net 2010 form positioning Pin
NotPolitcallyCorrect19-May-13 10:51
NotPolitcallyCorrect19-May-13 10:51 
AnswerRe: VB.net 2010 form positioning Pin
claudiotronic19-May-13 20:37
claudiotronic19-May-13 20:37 
Questionneed VBA code!!! Pin
ssrd217-May-13 0:05
ssrd217-May-13 0:05 
AnswerRe: need VBA code!!! Pin
Richard MacCutchan17-May-13 1:09
mveRichard MacCutchan17-May-13 1:09 
QuestionHow To Print the Contents of a datagridview Pin
Evord16-May-13 2:12
professionalEvord16-May-13 2:12 
AnswerRe: How To Print the Contents of a datagridview Pin
Richard MacCutchan16-May-13 2:59
mveRichard MacCutchan16-May-13 2:59 
AnswerRe: How To Print the Contents of a datagridview Pin
Eddy Vluggen16-May-13 3:01
professionalEddy Vluggen16-May-13 3:01 
QuestionFinding Duplicate numbers Pin
CowlitzTroy13-May-13 21:29
CowlitzTroy13-May-13 21:29 
AnswerRe: Finding Duplicate numbers Pin
Dave Kreskowiak14-May-13 4:38
mveDave Kreskowiak14-May-13 4:38 
AnswerRe: Finding Duplicate numbers Pin
MicroVirus17-May-13 1:39
MicroVirus17-May-13 1:39 
GeneralRe: Finding Duplicate numbers Pin
Dave Kreskowiak17-May-13 2:19
mveDave Kreskowiak17-May-13 2:19 
QuestionLists of objects without losing class Intelli-sense Pin
Purge1t13-May-13 18:24
Purge1t13-May-13 18:24 
AnswerRe: Lists of objects without losing class Intelli-sense Pin
Dave Kreskowiak13-May-13 18:51
mveDave Kreskowiak13-May-13 18:51 
GeneralRe: Lists of objects without losing class Intelli-sense Pin
Purge1t13-May-13 19:21
Purge1t13-May-13 19:21 
Thanks for the naming scheme advice. What I use for my project is a lot easier. It was just a quick example. I should have made it easier to read, sorry.

My primary issue is that I need to have multiple class objects that behave differently (playership, enemy drone, missile etc) held in a single container so that my main loop can enumerate through them all.

For example.
For i as integer = 0 to blobs.count - 1
blobs(i).AiTick
blobs(i).Move
blobs(i).Draw
Next i


The only way I could find to do this was to create a base class with the ai/move/draw methods in it and have different classes inherit from the base class and over-ride the base class's methods.

The main issue i have is that these classes that inherit from the base class occasionally have extra methods. I would like to see those when i'm coding things like blobs(0).ExtraMethod like i can for the base class.

I guess what i'm asking isn't possible.

If ClassA inherits BaseClass and ClassB inherits BaseClass but ClassA also has an extra method called "ExtraMethod" then I already run the risk of accidently executing ExtraMethod on the item in the collection that is ClassB and causing an exception. I deal with that issue already in my code, so i don't understand why the dev environment is perfectly fine with me making a list(of Objects) and running List(0).ExtraMethod ... however when I ask it to have a list of BaseClass it doesnt goto the effort of listing what's availiable in any classes that inherit from BaseClass.

I guess I will just continue to have a list(of Object) instead of a list(of BaseClass) and continue running extra methods from classes that inherit from BaseClass as I currently do by first checking the object type.
GeneralRe: Lists of objects without losing class Intelli-sense Pin
Dave Kreskowiak14-May-13 3:44
mveDave Kreskowiak14-May-13 3:44 
GeneralRe: Lists of objects without losing class Intelli-sense Pin
Purge1t14-May-13 11:55
Purge1t14-May-13 11:55 

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.