private static void AddIndustryTypes(sectorCode[] result) { var industryTypes = (from t in result select new Industry { Key = t.sector_key, Mnem = t.sector_mnem, Desc = t.sector_desc, }).OrderBy(o => o.Mnem).ToList(); IndustryTypes = new ObservableCollection<Industry>(industryTypes); System.Windows.Application.Current.Resources[IndustryTypeKey] = IndustryTypes; }
数组/LINQ/List/ObservableCollection
时间: 2024-11-03 03:42:46