© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
174 replies
Emelie

✅ What is IEnumerable<out T> ?

Hi! I have written this code which works, but I dont understand what type of value 'var myQuery' actually is. Is it an array containing
the filtered values?

// Data source.
int[] numbers = new int[] { 34, 57, 89, 12, 4, 6, 7, 123 };

// Data query. <---MY QUESTION
var myQuery = numbers.Where(number => number < 10);

// Data Execution.
foreach (var number in myQuery)
{
Console.WriteLine(number);
}
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Next page

Similar Threads

Implementing IEnumerable<T>
C#CC# / help
3y ago
✅ Can my Equals(IEnumerable<T>? x, IEnumerable<T>? y) be made much simpler?
C#CC# / help
3y ago
IEnumerable<T> (or List<T>, or T[]) to IEnumerable (non-generic, ie. no type param)?
C#CC# / help
2y ago
IEnumerable<Author>
C#CC# / help
3mo ago