Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はまだ学んLINQでいるので、我慢してください:)。私の質問、次のコードをに変換する方法LINQ
LINQ
int count = 0; foreach (var item in settings.FavouritesSetting) { if (item.FavouriteType != Constants.FavouriteType.Folder) count++; } return count.ToString();
var count = settings.FavouritesSetting.Count(i => i.FavouriteType != Constants.FavouriteType.Folder); return count.ToString();