コード例 #1
0
 public static List <SelectListItem> Get(string selected)
 {
     return(TimeZoneInfo.GetSystemTimeZones().Select
            (
                tz =>
                new SelectListItem
     {
         Text = tz.DisplayName,
         Value = cnv.ConvertToString(tz),
         Selected = tz == cnv.ConvertFromString(selected)
     }
            ).ToList());
 }