Problem Statement: I have a task that requires choosing a certain percentage of the number of objects.If there are 100 objects of Type A being routed and lets say i need only 5% of Type A objects chosen at random.
At a time, a single object of Type A is routed to my App. (How do i store/retain the number of objects of Type A previously processed (without storing in a database)).Lets say this is count = 1. The next time an object of Type A is routed to my App, it will be count =2.
What would be the best way to retain the count while the app is up and running? If the app crashes, what would be the best way to retain the count?
Please Note : Writing code in C# .net
Thought about a counter that is set to increment every time TYPE A is routed to my App
Aucun commentaire:
Enregistrer un commentaire