torno torno - 1 month ago 14
C# Question

Parsing FQN of enum constant to enum constant w/o splitting the string

Trying to parse an commandline argument ( 'MyNameSpace.MyEnumClassName.MyConstantName') in order to get the constant.

Is this possible without extracting the EnumClassName? I know that I could get the constant with


But is there a direct way?

This argument can be used for different things. There can be a fqn of a class, a constant, ... I know it's not kind of 'clean', but that`s not part of this question.


As there seems to be no direct way, I close this question with the answer "no".