© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•6mo ago•
19 replies
AceOfAces

IEnumerable and loops

A bit of a rapid-fire question: if I only need to iterate on a collection once, is it OK to use IEnumerable? For example, using
Directory.EnumerateFiles(path)
Directory.EnumerateFiles(path)
to filter out the files in separate lists.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

✅ For loops, while loops, and TryParses
C#CC# / help
13mo ago
❔ Interfaces, IEnumerator and IEnumerable
C#CC# / help
3y ago
❔ IEnumerable and dependency injection
C#CC# / help
4y ago
SequenceEqual with IEnumerable and Span?
C#CC# / help
3mo ago