public static string BaseTypeToString(this BaseTypes enumValue) { try { return(enumValue.GetType() .GetMember(enumValue.ToString()) .First() .GetCustomAttribute <DisplayAttribute>() .Name); } catch (System.Exception) { return(enumValue.ToString()); } }