I want to generate folders using combinations of given characters
i.e. 8 character text with combination of characters: abcdefghijklmnopqrstuvwxyz1234567890.
For the 8 characters combinations there are 2821109907456 possibilities. I want to group these by range of 10,000.
I need to put these folders in relevant range folders i.e.
‘aaaaaaa1 – aaaaaaa9’ is a range of 9 combinations and a folder ‘aaaaaaa3’ will be created in this range folder.
I want to use c# code, give my method a folder name i.e. ‘aaaaaaa3’ and be returned the relevant folder range i.e. ‘aaaaaa1 – aaaaaaa9’ where it should be saved.
Question: I need c# code to do this!
From the beginning, it looks like we’re going to need to compute ranges of alphanumeric sequences, which means converting them to numbers and back. An all-purpose base converter seems like the first logical step:
Then, you’ll need the code to compute your ranges:
Finally, tie the BaseConverter and NumericRangeFactory classes together to solve the problem with this sample static method:
I haven’t tested this, but I think the concept is solid.