I'm tripping up on something basic, but two hours into this, I think it's time to step back and ask for help.
Class level collections:
[code]
Dictionary<string, Summary> pairs = new Dictionary<string, Summary>();
[/code]
Assignment inside of Form1():
[code]
// The "EUR/USD key has already been added to the dictionary.
pairs["EUR/USD"] = new Summary(0, 0, 0);
pairs["EUR/USD"].IncrementTotal();
[/code]
Declaration of Summary structure:
[code]
struct Summary
{
private int winners, losers, total;
public Summary(int tot,int win, int lose)
{
winners = win;
losers = lose;
total = tot;
}
public int Winners
{ get { return this.winners; } }
public int IncrementWinner()
{ return this.winners++; }
public int Losers
{ get { return losers; } }
public int IncrementLoser()
{ return this.losers++; }
public int Total
{ get { return total; } }
public int IncrementTotal()
{ return total++; }
}
[/code]
The output of total for EUR/USD should be 1 higher than the initialized value. It keeps coming out as the initialized value. What am I missing?
