© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•13mo ago•
9 replies
Faker

LINQ in C#

Hello guys, sorry to disturb you all; I'm currently learning about arrays. I noticed that we can query the array to return a new one using the following syntax:

evenNumbers = numbers.Where(n => n % 2 == 0).ToArray();
evenNumbers = numbers.Where(n => n % 2 == 0).ToArray();


I have one question. I understood that the ToArray() method is used to convert the filtering result into an array. But what if we omit it? What would happen? What would evenNumber store? Would we be able to access the filtered values?
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

Similar Threads

✅ Beginner needs help in C# HtmlAgilityPack and Linq query
C#CC# / help
2y ago
C# wpf mvvm Datagrid filter using LINQ
C#CC# / help
4y ago
LINQ
C#CC# / help
2y ago
❔ LINQ
C#CC# / help
3y ago