Westwind.WebConnection.wwDotNetBridge.GetEnumString C# (CSharp) Method

GetEnumString() public method

Returns the name of an enum field given an enum value passed. Pass in the name of the enum type
public GetEnumString ( string EnumTypeName, object Value ) : string
EnumTypeName string
Value object
return string
        public string GetEnumString(string EnumTypeName, object Value)
        {
            SetError();
            try
            {
                Type type = GetTypeFromName(EnumTypeName);
                return Enum.GetName(type, Value);
            }
            catch(Exception ex)
            {
                SetError(ex.GetBaseException());
                throw ex.GetBaseException();
            }

            return null;
        }
wwDotNetBridge