Quote:
Originally Posted by feisty2
not that much different here, uh?
|
Good to know.
Then, I could create a generic class that automatically builds a dictionary from specified Enum on first use (via reflection), and then does the conversion though the dictionary on all subsequent calls.
But in the case of AviSynth, the Enum is a bit more complicated than that, with combinations of fields, and with names that don't always match format values, so here there's no way around listing all valid formats manually. Plus, it's only 1 Enum, and it's unlikely to change much. If it were 100 Enums that could change and evolve regularly, then it would be a different story.