Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › VB.NET nested structures HELP :)
New Posts  All Forums:Forum Nav:

VB.NET nested structures HELP :)

post #1 of 3
Thread Starter 
Hey everyone,
I have a question about nested structures in vb.net
Basically I want to do this:

Structure airport
Dim name As String
Dim takeoffs(23) As Integer
End Structure

Dim airportT(50) as airport

The goal is to have a table (airportT) storing up to 51 airports where it's possible to store the number of takeoffs PER HOUR (for each airport).

Basically, something like:

0- O'Hare
0- 340
1- 450
2- 545
.
.
.
.
.
.
23- 564


50- Midway
0- 34
1- 45
2- 54
.
.
.
.
.
.
23- 56

I've been looking all over the net and people are coming up with classes, arrays etc and I don't really know what to do.

Any help is greatly appreciated!
Edited by Emmanuel - 1/30/11 at 7:36am
    
CPUMotherboardGraphicsRAM
Intel i7 6850K 4.3GHz (100x43) 1.355v Evga X99 Classified BIOS 2.03 Gigabyte Aorus Xtreme 1080ti G.SKILL 4x4GB 3200MHz 16-16-16-36 1T 1.35v 
Hard DriveOptical DriveCoolingOS
Samsung SM961 1TB NVMe + 1TB Samsung 840 Evo External Asus drive 2x MCP655 in independent loops Windows 7 Pro 64-bit 
MonitorKeyboardPowerCase
Philips BDM4065UC 40" 4K Logitech G19 Evga 1200 P2 Enthoo Pro M 
MouseAudio
Logitech G900 Asus Essence XT II PCIe 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel i7 6850K 4.3GHz (100x43) 1.355v Evga X99 Classified BIOS 2.03 Gigabyte Aorus Xtreme 1080ti G.SKILL 4x4GB 3200MHz 16-16-16-36 1T 1.35v 
Hard DriveOptical DriveCoolingOS
Samsung SM961 1TB NVMe + 1TB Samsung 840 Evo External Asus drive 2x MCP655 in independent loops Windows 7 Pro 64-bit 
MonitorKeyboardPowerCase
Philips BDM4065UC 40" 4K Logitech G19 Evga 1200 P2 Enthoo Pro M 
MouseAudio
Logitech G900 Asus Essence XT II PCIe 
  hide details  
Reply
post #2 of 3
You could change your Airport Structure to a class. (Just replace Structure words by Class) So this way you could initialize the length of your Takeoffs array. (It's not possible to do this within a structure.)
post #3 of 3
I forgot some of the syntax for data tables in VB I can look it up before my next class and post it if you want. I noticed this is from a week ago though, is it still relevant?
OC Beast
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8500 @4GHZ Gigabyte P45 4850x2 2GB IT LIVES! 4GB 
Hard DriveOptical DriveOSMonitor
500AAKS+250external CD-DVD combo windows 7 ultimate x64 26" 
KeyboardPowerCaseMouse
MC$ wireless 650w corsair antec 900 Logitech battlefield 2142 G5 
  hide details  
Reply
OC Beast
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8500 @4GHZ Gigabyte P45 4850x2 2GB IT LIVES! 4GB 
Hard DriveOptical DriveOSMonitor
500AAKS+250external CD-DVD combo windows 7 ultimate x64 26" 
KeyboardPowerCaseMouse
MC$ wireless 650w corsair antec 900 Logitech battlefield 2142 G5 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › VB.NET nested structures HELP :)