Utilizing a Queue
- by Nathan
I'm trying to store records of transactions all together and by category for the last 1, 7, 30 or 360 days. I've tried a couple things, but they've brutally failed. I had an idea of using a queue with 360 values, one for each day, but I don't know enough about queue's to figure out how that would work.
Input will be an instance of this class:
class Transaction
{
public string TotalEarned { get; set; }
public string TotalHST { get; set; }
public string TotalCost { get; set; }
public string Category { get; set; }
}
New transactions can occur at any time during the day, and there could be as many as 15 transactions in a day. My program is using a plain text file as external storage, but how I load it depends on how I decide to store this data.
What would be the best way to do this?