小编Ale*_*ann的帖子

.net集合优化

我在.Net Collections中并不是很有经验.

在这里,我有一些我想以某种方式重写的代码.

emptyOrganization.Name = "";
var organizations = new List<IOrganization>();
organizations.Add(emptyOrganization);
organizations.AddRange(_organizationRepository.GetAll(LanguageCurrent.Id));
model.Organizations = organizations;
Run Code Online (Sandbox Code Playgroud)

可以用更少的行重写吗?

.net c# collections

0
推荐指数
1
解决办法
99
查看次数

标签 统计

.net ×1

c# ×1

collections ×1