I am trying to define an Enum and add valid common separators which used in CSV or similar files. Then I am going to bind it to a ComboBox as a dat
You can't, because enum can only be based on a primitive numeric type. You could try using a Dictionary instead:
Dictionary separators = new Dictionary
{
{"Comma", ','},
{"Tab", '\t'},
{"Space", ' '},
};
Alternatively, you could use a Dictionary or Dictionary where Separator is a normal enum:
enum Separator
{
Comma,
Tab,
Space
}
which would be a bit more pleasant than handling the strings directly.