C# feature request for Anders
Hello Anders,
Could you add to C# support for things like this?
enum Colors {Red, Green, Blue};
string[Colors] htmlColors = new string[] {"#FF000", "#00FF00", "#0000FF"};
This is something we have in Delphi (you remember Delphi, don't you?) that I miss in C#. I don't think it would be difficult to add to the compiler. But if we don't have it yet, maybe there is a problem somewhere?
Of course, we can find more examples where this syntax would help, and not only with strings.
If we go a bit further, we can even imagine something like this:
enum Colors<string> {Red = "#FF0000", Green = "#00FF00", Blue = "#0000FF"};
Let me know what you think,
Yours truly,
Fabrice