Guest User

Untitled

a guest
Jan 22nd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. var months = CultureInfo.CurrentUICulture.DateTimeFormat.MonthNames.Take(12);
  2. return months.Aggregate(new List<SelectListItem>(), (accumulator, month) =>
  3. {
  4. accumulator.Add(new SelectListItem{ Value = (accumulator.Count + 1).ToString(), Text = month });
  5. return accumulator;
  6. });
Add Comment
Please, Sign In to add comment