foreach (Feature fe in features) { if (fileNames.Any(file => file.Contains(fe.FeatureName))) { fe.MatchCount = fe.MatchCount == 0 ? 1 : fe.MatchCount; } }
c# linq
c# ×1
linq ×1