I have a program which takes in various command line parameters and
each prefixed with a letter for eg:
/a:one /b:two etc.,
Currently I have a switch statement which phrases the parameter and
assigns the value after the parameter to corresponding private
variable. I have almost 19 case statements in the switch and most of
them are straight assignments. Just wondering, is there a better way
to do it, either using hash table or list or some other data structure
in C#?
Thanks,
each prefixed with a letter for eg:
/a:one /b:two etc.,
Currently I have a switch statement which phrases the parameter and
assigns the value after the parameter to corresponding private
variable. I have almost 19 case statements in the switch and most of
them are straight assignments. Just wondering, is there a better way
to do it, either using hash table or list or some other data structure
in C#?
Thanks,
Comment