public IEnumerable <string> GetDateFormats() { int optionsCount = FormatOptions.Options.Count; for (int i = 0; i < optionsCount; i++) { FormatOptions.SelectByIndex(i); yield return(DateInput.GetAttribute("value")); } }