private static string ConvertEnumToString(ResultsType type) { return(type .GetType() .GetMember(type.ToString()) .FirstOrDefault() ?.GetCustomAttribute <DescriptionAttribute>() ?.Description ?? type.ToString()); }