Author | Message | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Meka][Meka Unstopable Posts: 700 | note: you may use this tutorial on other sites as long as u post the author note -------------------------- Hash tables -------------------------- Author: Meka][Meka -------------------------- http://www.meka-meka.com/ -------------------------- Hashtables are used for storing items, with quick retrieving, for example of you are using more then 1 of the same class lets get started: in your main form class paste
we will use the class and functions from the understanding classes tutorial http://www.meka-meka.com/forum/viewtopic.php?t=104 < if you have not done this tut, do that first. ok we need to make 5 or so of the same class, in form1 load paste
unfortuably, u cant pass all of them at once, u will lose 1,2,3,4 but still have the 5th thats made, this is where the hash table comes in, we need to add the item to the table
this is simple to understand, add(nametocallby, theclassoritem)
ok now we need a function to loop thru the table to show u we have all the classes inside
ok now it will loop thru them all, done, but now we need to remove them when not being used,so lets do that in 'TheFunction' after the names and data have been boxed.
run your code and see it loop the table | ||||||||||||
Corayzon Regular Posts: 67 | very nice methods meka-meka good to see i dont have to stick to user control arrays when i want variable length arrays of user definded objects in visual basic 7 .net ^^ yay! |