I have enum
namespace ConsoleTestApplication
{
public enum Cars
{
Audi,
BMW,
Ford
}
}
now I want to get fully qualified name of enum member
so the result will be
ConsoleTestApplication.Cars.Audi
something like
Cars.Audi.GetType().FullName;
or
Cars.Audi.GetType().AssemblyQualifiedName;
what I am looking for, but non of those actually does what I need.
The reason of why I need it, because I have two identical enums in different namespaces (don't blame me on bad design, this is how it should be in my project) and in one part of my program I need to use member of this enum, but because I have same enums it's gonna complain on ambiguity between same enums in different namespaces. So in order to avoid it I have to provide fully qualified name, reason of why I can't do it manually because this is kind of auto generated files, so I need to specify it programmaticaly at compile time