diff options
author | Marek Safar <marek.safar@gmail.com> | 2008-08-15 14:01:39 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2008-08-15 14:01:39 +0400 |
commit | 13080c16fee72e2e39f7948536acf8f4ad27aaa1 (patch) | |
tree | d10c891e3dea03d105d0a3f9bfccb4acdceb47bc /mcs/class/System.Core/System.Linq/Enumerable.cs | |
parent | 20bec9f2c14a9eb71a24543558e45cd8225bf77e (diff) |
Revert broken change
svn path=/trunk/mcs/; revision=110559
Diffstat (limited to 'mcs/class/System.Core/System.Linq/Enumerable.cs')
-rw-r--r-- | mcs/class/System.Core/System.Linq/Enumerable.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mcs/class/System.Core/System.Linq/Enumerable.cs b/mcs/class/System.Core/System.Linq/Enumerable.cs index 30b45a04342..b2e274b29db 100644 --- a/mcs/class/System.Core/System.Linq/Enumerable.cs +++ b/mcs/class/System.Core/System.Linq/Enumerable.cs @@ -326,10 +326,15 @@ namespace System.Linq public static IEnumerable<TResult> Cast<TResult> (this IEnumerable source) { Check.Source (source); - + + return CreateCastIterator<TResult> (source); + } + + static IEnumerable<TResult> CreateCastIterator<TResult> (IEnumerable source) + { foreach (TResult element in source) yield return element; - } + } #endregion |