C# Program to Implement IEnumerable Interface using LINQ

0
This C# Program Implements IEnumerable Interface using LINQ. Here it exposes an enumerator, which supports a simple iteration over a non-generic collection.


Here is source code of the C# Program to Implement IEnumerable Interface using LINQ. The C# program is successfully compiled and executed with Microsoft Visual Studio. The program output is also shown below.
  1. /*
  2.  * C# Program to Implement IEnumerable Interface using LINQ
  3.  */
  4. using System;
  5. using System.IO;
  6. using System.Collections;
  7. using System.Linq;
  8. class program
  9. {
  10.     public static void Main(string[] args)
  11.     {
  12.         var t = typeof(IEnumerable);
  13.         var typesIEnum = AppDomain.CurrentDomain.GetAssemblies().SelectMany(x => x.GetTypes()).Where(x => t.IsAssignableFrom(x));
  14.         foreach (var types in typesIEnum)
  15.         {
  16.             Console.WriteLine(types.FullName);
  17.         }
  18.         Console.ReadLine();
  19.     }
  20. }

Here is the output of the C# Program:
System.Linq.Parallel.IndexedSelectQueryOperator`2
System.Linq.Parallel.IndexedSelectQueryOperator`2+IndexedSelectQueryOperatorResults
System.Linq.Parallel.IndexedWhereQueryOperator`1
System.Linq.Parallel.LastQueryOperator`1
System.Linq.Parallel.ReverseQueryOperator`1
System.Linq.Parallel.ReverseQueryOperator`1+ReverseQueryOperatorResults
System.Linq.Parallel.SelectManyQueryOperator`3
System.Linq.Parallel.SelectQueryOperator`2
System.Linq.Parallel.SelectQueryOperator`2+SelectQueryOperatorResults
System.Linq.Parallel.SingleQueryOperator`1
System.Linq.Parallel.SortQueryOperator`2
System.Linq.Parallel.SortQueryOperatorResults`2
System.Linq.Parallel.TakeOrSkipQueryOperator`1
System.Linq.Parallel.TakeOrSkipQueryOperator`1+TakeOrSkipQueryOperatorResults
System.Linq.Parallel.TakeOrSkipWhileQueryOperator`1
System.Linq.Parallel.WhereQueryOperator`1
System.Linq.Parallel.ListChunk`1
System.Linq.Parallel.Lookup`2

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Good readers always drop comments!!

Good readers always drop comments!!

Post a Comment (0)

buttons=(Accept !) days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
To Top