Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJb Evain <jbevain@gmail.com>2008-08-08 12:41:14 +0400
committerJb Evain <jbevain@gmail.com>2008-08-08 12:41:14 +0400
commit8d8a72bb90140ab403a0e9e134ae95d2c87cc6bc (patch)
tree9cf22d88160b7a152c7fbe3e48064d1838e1d09e /mcs/class/System.Core/System.Linq/Enumerable.cs
parent3c28c0d5678a54dcdc644255870bddba7457bc3a (diff)
fix #415644
svn path=/trunk/mcs/; revision=109948
Diffstat (limited to 'mcs/class/System.Core/System.Linq/Enumerable.cs')
-rw-r--r--mcs/class/System.Core/System.Linq/Enumerable.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/mcs/class/System.Core/System.Linq/Enumerable.cs b/mcs/class/System.Core/System.Linq/Enumerable.cs
index b7829d77a73..d8de3a8c66c 100644
--- a/mcs/class/System.Core/System.Linq/Enumerable.cs
+++ b/mcs/class/System.Core/System.Linq/Enumerable.cs
@@ -2029,10 +2029,10 @@ namespace System.Linq
int counter = 0;
foreach (TSource element in source) {
- if (counter++ == count)
- yield break;
-
yield return element;
+
+ if (++counter == count)
+ yield break;
}
}