I'm not sure for your class... (because computer programming classes are stupid) but you'd want to create a class.. and create a list of your class... for instance...
keep in mind i don't write in visual basic... so.. this might be wrong.. but you'll get the idea..
Code
Public Class Family
private _yearlyincome as integer
Public Property YearlyIncome as Integer
get
return _yearlyincome
end get
set (byval value as integer)
_yearlyincome = value
end set
private _familyidcode as integer
Public Property FamilyIdCode as Integer
get
return _familyidcode
end get
set (byval value as integer)
_familyidcode = value
end set
End Class
As you see there...
then you'd just create the objects.. and add them..
Code
dim familymember as Family
familymember.FamilyIdCode = 32232
familymemeber.YearlyIncome = 200000
dim listoffamily as new List(of Family)
listoffamily.add(familymember)
OR!!! you can simly do the same thing but create a list of arrays... Create an array for each family... and a list that contains every family...
The class is the coolest because you can do advanced awesome stuff with it using LINQ like (which i've NEVER done LINQ in visual basic... but it's something like this:)
Code
dim familiesthatmakemorethan100k = from p in listoffamily where p.YearlyIncome > 100000
yup... LINQ is badass.
This post was edited by squirrel on Oct 22 2012 04:46pm