Similar in how one would count from 0 to F in Hex, I have an array of numbers and letters I want to "count" from... and when I hit the max value, I want to start all over again in the "tens" column.
I need this to increase storage efficiency in Azure Table, and to keep my PrimaryKeys tiny (so I can use them in a tinyURL). First consider that only these characters are permitted as a propertyName, as documented here. In the array below, each character is positioned according to how Azure will sort it.
public static string[] AzureChars = new string[]
{
"0","1","2","3","4","5","6","7","8","9","A",
"B","C","D","E","F","G","H","I",
"J","K","L","M","N","O","P","Q",
"R","S","T","U","V","W","X","Y",
"Z","a","b","c","d","e","f","g",
"h","i","j","k","l","m","n","o",
"p","q","r","s","t","u","v","w",
"x","y","z"
};
My goal is to use 2 string/ASCII characters to count from the string "00" to lowercase "zz".
What is the best way to approach this concept using C#?
-- Is an array the correct object to use?
-- How will I associate a given character (uppercase 'Y') with it's position in the Array?
I'm just experimenting with this idea. At first brush it seems like a good one, but I haven't seen anyone consider doing things this way. What do you think?