Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi and Hello everybody,

I am learning c# collections and found some LINQ retrieving queries , but couldn't understand where we must use iEnumeralbe and where we may not need it,

if anybody gives me the difference of the following two types, would be greatful for me to move further... thanks in advance guys..



int[] integers = { 1, 9, 5, 3, 7, 2, 11, 23, 50, 41, 6, 8 };
IEnmerable<int> takeWhileNumber = integers.TakeWhile(num =>
num.CompareTo(50) != 0);




int[] takeWhileNumber ;
int[] integers = { 1, 9, 5, 3, 7, 2, 11, 23, 50, 41, 6, 8 };
takeWhileNumber = integers.TakeWhile(num =>
num.CompareTo(50) != 0);
Posted

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900