This is a bit different.
The following code was taken from a javascript script. What it’s (supposedly) doing is assigning properties to the line item. A name, a relations array, rounds array (which they lost in), total wins, three tiebreaker scores, and if they had a bye. (This is for a swiss pairing algorithm.)
data[pid] = {
name: name,
relations: {},
rounds: {},
wins: 0,
tie1: 0,
tie2: 0,
tie3: 0,
hadBye: false
};
I want to do something like this in Visual Basic. I’m pulling data from a table using a OleDBReader. I want to give each item that is pulled a set of these properties. Then by some means changing them.
How do I get started with this?
Hopefully this gets you going in the right direction. I’ve setup a pretty simple example.
First I created a
LineItemobject class that looks something like this:Then in the method that is performing all of the work, I create a new
LineItemand simply setup some properties for it like so:This code is pretty abstract so modifying it to conform to your needs shouldn’t be too difficult.