In case you need access a global namespace (object without namespace) like following definition, you could use a this X++ code.

C# code:

namespace KFEnumNamepace

{

public enum KFEnumNamespaced

    {

        ValueNA = 100,

        ValueNB,

        ValueNC,

        ValueND

    }

}

public enum KFEnumGlobal

{

    ValueA = 1000,

    ValueB,

    ValueC,

    ValueD

}

​X++ Code: (enumdll is name of assembly which contain Enums)

static void JobEnumDLL(Args _args)
{
    ClrObject co;
    System.Type typeOfEnvironment;
    System.Type typeOfEnum;
    System.Reflection.Assembly assem;
    ;
    co = KFEnumNamepace.KFEnumNamespaced::ValueNC;
    print co;
    assem = System.Reflection.Assembly::Load("enumdll");
    typeOfEnum = assem.GetType("KFEnumGlobal");
    co = System.Enum::Parse(typeOfEnum, 'ValueB' );
    print co;
    pause;
}

--author: Karel Fischl