private static string GetCultureEquivalentString(DaysOfTheWeek val) { if (val == DaysOfTheWeek.AllDays) { return Resources.DOWAllDays; } var s = new List<string>(7); var vals = Enum.GetValues(val.GetType()); for (var i = 0; i < vals.Length - 1; i++) { if ((val & (DaysOfTheWeek)vals.GetValue(i)) > 0) { s.Add(DateTimeFormatInfo.CurrentInfo.GetDayName((DayOfWeek)i)); } } return string.Join(Resources.ListSeparator, s.ToArray()); }
private static string GetCultureEquivalentString(DaysOfTheWeek val) { if (val == DaysOfTheWeek.AllDays) { return(Resources.DOWAllDays); } List <string> s = new List <string>(7); Array vals = Enum.GetValues(val.GetType()); for (int i = 0; i < vals.Length - 1; i++) { if ((val & (DaysOfTheWeek)vals.GetValue(i)) > 0) { s.Add(DateTimeFormatInfo.CurrentInfo.GetDayName((DayOfWeek)i)); } } return(string.Join(Resources.ListSeparator, s.ToArray())); }