.NET Conditional Callback on a type.
- by Mahesh
I have a stock price which changes by nature all the time. And, there will be many users who wants to buy that stock.
Let's say that the stock price is started at 10 and let's say, 30 people bid for 10.98, 20 people bid for 7.45, 100 people bid for 8.99.
During the day, the stock price can touch any of these values, and if that happens, I want to execute all the orders for users who quoted that price.
Technically, I am storing in a List. Whenever the price changes, I am checking against all the values in the list and executing those that satisfy the quoted price.
Class Bids
{
string stockname;
double quote;
}
Is there any better alternative way to callback the satisfied items in the list rather than checking all the items whenever there is a change??
If storing in a list is not right way of doing it, let me know the best way.