|
-
Aug 25th, 2010, 01:59 PM
#1
Thread Starter
Junior Member
Using a collection for the first time and need help
I am trying to come up with a way to store 3 pieces of information for each employee in the company on a daily basis. So for instance
Day 1: Joe, 8, 80
Day 2: Sam, 10, 90
Day 3: Bill, 5, 40
Day 4: Bob, 8, 40
Day 5: Sue, 2, 50
I am very new to collections and most of the applications that I build are Create, Read, Update and Delete type applications that don't really need arrays so I have almost no experience with either.
This is what I have so far. Am I on the right track here or is there a better way to do what I am trying to do?
VB Code:
'
Dim iDays As Integer = NumberDaysPerMonth(Date.Now)
Dim DayNumber(iDays) As Integer
Dim EmployeeRecords As List(Of String) = New List(Of String)
For i = 1 To DayNumber.Count - 1
EmployeeRecords.Add(i)
' I want to actual call a function that will supply
' me with three strings (or fields). The three strings
' will be [EmployeeName], [Hours] and [Amount]. I
' don't need help with the function. I only need help
' with getting my collection to store the three values.
Next
For Each s In EmployeeRecords
Console.WriteLine(s)
Next
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|