I'm currently trying to figure out how I can keep ever-changing variable values and make it available for other classes to access the said variables.
In my example, I have the following:
public class Item
{
public int Quantity;
public int BuyPrice;
public int SellPrice;
}
The value for all the variables in Item class will change every day.
Let's say I'm entering Day #2, how do I save class Item's variables value for Day #1 so that other classes would be able to refer to Day #1 value on Day #2?
Further to the my earlier question, there will be multiple Vendor classes having their own instances of Item and these Vendor classes will be visited by Agent classes.
I would like for the Agent to loop through all instances of Item sell price owned by the last Vendor it visited. Agent will hold a record of when it last visited the Vendor and will request for Item sell prices on that particular date by that particular Vendor.
Hope that make sense.
Item
instances, where each entry is one time sample? Where did you get stuck with this? \$\endgroup\$Dictionary<Item, BuyPrice>
,Dictionary<Item, SellPrice>
and anotherDictionary<Item, Quantity>
but that would get too complicated too soon. \$\endgroup\$