Scenario: Database has table with list of account numbers. Account numbers range from 0-9999. Customer is allowed to make account numbers for customers within that range, as they see fit.
Need: I am producing a report that shows unused account numbers in range format. So, I need a list of strings, showing available account numbers, in range format.
Example: Account numbers 0, 1, 2, 4, 20, 21, 22 are all being used in data. So the result list would be...
3
5-19
23-9999
Been stumbling around on this all day. How to do this with straight-up c#?