diff options
author | Jb Evain <jbevain@gmail.com> | 2008-08-08 12:41:14 +0400 |
---|---|---|
committer | Jb Evain <jbevain@gmail.com> | 2008-08-08 12:41:14 +0400 |
commit | 8d8a72bb90140ab403a0e9e134ae95d2c87cc6bc (patch) | |
tree | 9cf22d88160b7a152c7fbe3e48064d1838e1d09e /mcs/class/System.Core/System.Linq/Enumerable.cs | |
parent | 3c28c0d5678a54dcdc644255870bddba7457bc3a (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.cs | 6 |
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; } } |