I have a static array built from an enum, I would like to set up a static dictionary that uses the values in the array and returns the index
using System.Collections;
using System.Collections.Generic;
using System.Windows.Forms;
namespace somenamespace
{
static class someclass
{
static Keys[] allKeys = (Keys[])Enum.GetValues(typeof(Keys));
static Dictionary<Keys, int> allKeysRevDict = new Dictionary<Keys,int>()
{
//somecode
//Keys is the enum value, int is the index into my allKeys array
}
}
}