首页 > 代码库 > 数组/LINQ/List/ObservableCollection

数组/LINQ/List/ObservableCollection

        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;        }